simplify password repository setting

This commit is contained in:
Bob Sun 2017-02-21 13:07:14 +08:00
parent 2829e9145d
commit 87dd4f96a3
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
6 changed files with 153 additions and 169 deletions

View file

@ -64,6 +64,7 @@ struct GitCredential {
return nil
}
Defaults[.gitRepositoryPasswordAttempts] += 1
PasswordStore.shared.gitRepositoryPassword = newPassword
credential = try? GTCredential(userName: userName, password: newPassword)
case let .ssh(userName, password, publicKeyFile, privateKeyFile):
credential = try? GTCredential(userName: userName, publicKeyURL: publicKeyFile, privateKeyURL: privateKeyFile, passphrase: password)