【问题标题】:SmartGit authentication to bare repository fails, while push from commandline worksSmartGit 对裸存储库的身份验证失败,而从命令行推送有效
【发布时间】:2016-10-12 15:12:44
【问题描述】:

我已经使用命令行添加了一个远程裸存储库:

git add remote production ssh://username@domain.com/path/to/repo.git

我可以使用以下方式推送到存储库:

git push production master

现在我想从 SmartGit 推送:

  1. 我右键单击我的本地主分支并选择 Push To ...
  2. 在窗口中,我选择生产存储库并单击推送
  3. 显示一个对话框,要求我提供私人 SSH 密钥和密码。我指向私钥并输入密码,然后点击登录
  4. 对话框再次显示,我再次单击登录
  5. 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 建议写一个答案,并标记为已接受。

标签: git ubuntu ssh smartgit


【解决方案1】:
  1. 首选项身份验证部分启用使用系统SSH客户端
  2. 安装 ssh-askpass:sudo apt-get install ssh-askpass
  3. 然后再推...

【讨论】:

    猜你喜欢
    • 2021-02-19
    • 1970-01-01
    • 2011-06-04
    • 1970-01-01
    • 1970-01-01
    • 2014-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多