fix bugs of ssh key authentication method

This commit is contained in:
Bob Sun 2017-01-31 22:54:58 +08:00
parent 6f7d62dc60
commit 07da510ccb
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
4 changed files with 18 additions and 6 deletions

View file

@ -30,6 +30,7 @@ struct GitCredential {
print("username \(userName), password \(password)")
credential = try? GTCredential(userName: userName, password: password)
case let .ssh(userName, password, publicKeyFile, privateKeyFile):
print("username \(userName), password \(password), publicKeyFile \(publicKeyFile), privateKeyFile \(privateKeyFile)")
credential = try? GTCredential(userName: userName, publicKeyURL: publicKeyFile, privateKeyURL: privateKeyFile, passphrase: password)
}
return credential ?? GTCredential()