2016-05-15 11 views
1

我添加了一个远程纯仓库使用命令行:SmartGit身份验证的裸库失败,而从命令行推工程

git add remote production ssh://[email protected]/path/to/repo.git 

我用我能推到仓库:

git push production master 

现在我想从SmartGit推:

  1. 我右键点击我的本地主分支,选择脓h ...
  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)。

我错过了什么?

+1

配置时,会发生什么在**首选项**,第**部分**身份验证**中使用系统SSH客户端**。 – mstrap

+0

@mstrap工作!首先,日志抛出一个错误:'ssh-askpass [...]没有这样的文件或目录。所以我做了'sudo apt-get install ssh-askpass'。然后尝试像上面描述的新推。谢谢! – NinjaFart

+0

我建议根据mstrap建议编写答案,并且标记已被接受。 – Arashsoft

回答

0
  1. 启用使用系统SSH客户端,部分认证
  2. 安装SSH-askpass:sudo apt-get install ssh-askpass
  3. 然后再推...