complete SSH Key authentication
This commit is contained in:
parent
7a3f05701b
commit
62e2a7fe89
4 changed files with 15 additions and 5 deletions
|
|
@ -58,7 +58,11 @@ class PasswordStore {
|
|||
if Defaults[.pgpKeyID] != "" {
|
||||
pgp.importKeys(fromFile: Globals.shared.secringPath, allowDuplicates: false)
|
||||
}
|
||||
gitCredential = GitCredential(credential: GitCredential.Credential.http(userName: Defaults[.gitRepositoryUsername], password: Defaults[.gitRepositoryPassword]))
|
||||
if Defaults[.gitRepositoryAuthenticationMethod] == "Password" {
|
||||
gitCredential = GitCredential(credential: GitCredential.Credential.http(userName: Defaults[.gitRepositoryUsername], password: Defaults[.gitRepositoryPassword]))
|
||||
} else {
|
||||
gitCredential = GitCredential(credential: GitCredential.Credential.ssh(userName: Defaults[.gitRepositoryUsername], password: Defaults[.gitRepositorySSHPrivateKeyPassphrase]!, publicKeyFile: Defaults[.gitRepositorySSHPublicKeyURL]!, privateKeyFile: Defaults[.gitRepositorySSHPrivateKeyURL]!))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue