我在git中添加了server_users rsa.pub键,我得到的错误如下
Running /usr/bin/env git ls-remote -h http://git.example.com/nishant/pro-gasket.git on 52.24.70.121
DEBUG[c40f8fa6] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/pro-gasket/git-ssh.sh /usr/bin/env git ls-remote -h http://git.example.com/nishant/pro-gasket.git )
DEBUG[c40f8fa6] fatal: Authentication failed for 'http://git.example.com/nishant/pro-gasket.git/'
DEBUG[c40f8fa6]
DEBUG[c40f8fa6] Finished in 1.549 seconds with exit status 128 (failed).
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host 52.24.70.121: exit
/home/codebajra/.rvm/gems/ruby-2.1.3@pro-gasket/gems/capistrano-3.2.1/lib/capistrano/tasks/git.rake:28:in `exit' 服务器中的git版本为1.9.1
发布于 2015-10-02 10:04:09
由于服务器使用ssh连接到github,所以请为ssh使用repourl。
发布于 2017-04-20 12:59:11
除了基本的-
您可能遇到这样一种情况:您的部署刚刚停止工作,或者它们是为某些用户工作的,而不是为其他用户工作的--也就是说,您知道远程主机的设置是正确的。
在这种情况下,失败的用户可能不会在本地将其SSH密钥添加到ssh代理中--这是必需的,因为Capistrano使用SSH代理转发(即将本地ssh密钥转发到远程主机)。
要修复,请确保代理正在运行(本地),如下所示:
eval `ssh-agent -s`然后添加你的钥匙
ssh-add核实您的身份已按以下方式添加:
ssh-add -lhttps://stackoverflow.com/questions/32904448
复制相似问题