modules/git: fix dropped error (#127)
modules/git: fix dropped error Co-authored-by: Lars Lehtonen <lars.lehtonen@gmail.com> Reviewed-on: https://gitea.com/gitea/tea/pulls/127 Reviewed-by: 6543 <6543@noreply.gitea.io> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
e9dee07459
commit
35ad046d8d
|
@ -81,6 +81,9 @@ func readSSHPrivKey(keyFile string) (sig ssh.Signer, err error) {
|
|||
sig, err = ssh.ParsePrivateKey(sshKey)
|
||||
if err != nil {
|
||||
pass, err := promptPass(keyFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sig, err = ssh.ParsePrivateKeyWithPassphrase(sshKey, []byte(pass))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue