【发布时间】:2016-10-12 15:12:44
【问题描述】:
我已经使用命令行添加了一个远程裸存储库:
git add remote production ssh://username@domain.com/path/to/repo.git
我可以使用以下方式推送到存储库:
git push production master
现在我想从 SmartGit 推送:
- 我右键单击我的本地主分支并选择 Push To ...。
- 在窗口中,我选择生产存储库并单击推送。
- 显示一个对话框,要求我提供私人 SSH 密钥和密码。我指向私钥并输入密码,然后点击登录。
- 对话框再次显示,我再次单击登录。
-
SmartGit 在输出窗口中显示错误:
Push: Could not read from remote repository. /var/www/website> git push --porcelain --progress --recurse-submodules-check production refs/heads/master Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Could not read from remote repository.
我已检查我是否拥有正确的访问权限以及存储库是否存在。私钥也只有 onwer (chmod 600 ~/.ssh/id_rsa) 的读/写权限。
我错过了什么?
【问题讨论】:
-
在首选项的身份验证部分配置为使用系统SSH客户端时会发生什么?
-
@mstrap 工作!首先日志抛出一个错误:
ssh-askpass [...] no such file or directory。所以我做了sudo apt-get install ssh-askpass。然后尝试如上所述的新推送。谢谢! -
我建议根据 mstrap 建议写一个答案,并标记为已接受。