fix bugs of ssh key authentication method
This commit is contained in:
parent
6f7d62dc60
commit
07da510ccb
4 changed files with 18 additions and 6 deletions
|
|
@ -34,6 +34,14 @@ class SSHKeySettingTableViewController: UITableViewController {
|
|||
Defaults[.gitRepositorySSHPublicKeyURL] = URL(string: publicKeyURLTextField.text!)
|
||||
Defaults[.gitRepositorySSHPrivateKeyURL] = URL(string: privateKeyURLTextField.text!)
|
||||
Defaults[.gitRepositorySSHPrivateKeyPassphrase] = passphraseTextField.text!
|
||||
|
||||
do {
|
||||
try Data(contentsOf: Defaults[.gitRepositorySSHPublicKeyURL]!).write(to: Globals.shared.sshPublicKeyPath, options: .atomic)
|
||||
try Data(contentsOf: Defaults[.gitRepositorySSHPrivateKeyURL]!).write(to: Globals.shared.sshPrivateKeyPath, options: .atomic)
|
||||
} catch {
|
||||
print(error)
|
||||
}
|
||||
|
||||
navigationController!.popViewController(animated: true)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue