diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt b/app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt index 072c1c1c..e6915853 100644 --- a/app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt +++ b/app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt @@ -149,7 +149,9 @@ constructor( in listOf("ssh", null) -> Protocol.Ssh else -> return UpdateConnectionSettingsResult.FailedToParseUrl } - if (newAuthMode != AuthMode.None && parsedUrl.user.isNullOrBlank()) + if ((newAuthMode != AuthMode.None && newProtocol != Protocol.Https) && + parsedUrl.user.isNullOrBlank() + ) return UpdateConnectionSettingsResult.MissingUsername(newProtocol) val validHttpsAuth = listOf(AuthMode.None, AuthMode.Password) val validSshAuth = listOf(AuthMode.OpenKeychain, AuthMode.Password, AuthMode.SshKey) |