2016-11-17 49 views
1

看来,当我使用带密码的ssh密钥时,我无法通过IntelliJ UI推送更改到github。我得到以下错误:Intellij - Git通过UI推送失败时,私钥包含密码

"Push failed: Failed with error: fatal: Could not read from remote repository." 

但是,当我通过命令行推送它时,它的作品,因为我得到提示输入密码短语。

我已经尝试将GIT_SSH环境变量设置为指向TortoiseGitPlink.exe(我正在使用ssh代理),但仍然出现相同的错误。

有没有其他的方式来完成这项工作?

回答

1

我碰到了同样的问题。 ssh-agent和ssh-pageant为命令行工作,但不是intellij。

对于我来说,最终的解决方案是create another ssh key pairs without passphrase(当系统提示“输入密码”窗口时,只需按“Enter”即可)。

如果安全性是您最关心的问题之一,您可以使用命令行git plus ssh-agent。