Git 从身份验证套接字读取响应长度时出错

Git 从身份验证套接字读取响应长度时出错,git,ruby-on-rails-4,capistrano3,Git,Ruby On Rails 4,Capistrano3,在我的RubyonRails项目中,我使用capistrano、unicorn、postgresql和nginx来部署我的项目。当我运行cap production git:check时,我收到以下错误: Error reading response length from authentication socket. 日志跟踪: INFO [13522bc0] Running /usr/bin/env mkdir -p /tmp/deploy_test/ as mezbah@192.168.

在我的RubyonRails项目中,我使用capistrano、unicorn、postgresql和nginx来部署我的项目。当我运行
cap production git:check
时,我收到以下错误:

Error reading response length from authentication socket.
日志跟踪:

INFO [13522bc0] Running /usr/bin/env mkdir -p /tmp/deploy_test/ as mezbah@192.168.137.130
DEBUG [13522bc0] Command: /usr/bin/env mkdir -p /tmp/deploy_test/
INFO [13522bc0] Finished in 0.291 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/deploy_test/git-ssh.sh 0.0%
INFO Uploading /tmp/deploy_test/git-ssh.sh 100.0%
INFO [3b379ef0] Running /usr/bin/env chmod +x /tmp/deploy_test/git-ssh.sh as mezbah@192.168.137.130
DEBUG [3b379ef0] Command: /usr/bin/env chmod +x /tmp/deploy_test/git-ssh.sh
INFO [3b379ef0] Finished in 0.067 seconds with exit status 0 (successful).
INFO [8355617a] Running /usr/bin/env git ls-remote --heads git@github.com:mezbahalam/deploy_test.git as mezbah@192.168.137.130
DEBUG [8355617a] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/deploy_test/git-ssh.sh /usr/bin/env git ls-remote --heads git@github.com:mezbahalam/deploy_test.git )
DEBUG [8355617a]    Error reading response length from authentication socket.
DEBUG [8355617a]    6399a4a331342141ed3bbf3afb58f58828f96c76    refs/heads/master
INFO [8355617a] Finished in 9.683 seconds with exit status 0 (successful).

我读了一些,但我想不出任何解决办法

我不知道为什么会发生这种情况,但我在我的许多部署中都看到过这种情况,并且它们仍然可以完美地工作。我认为这个错误可以忽略。

TL;DR

# start/restart ssh-agent
eval "$(ssh-agent -s)"

# add the desired ssh-key
ssh-add ~/.ssh/id_rsa
有关更多详细信息,请参阅


我过去也遇到过同样的问题,这篇文章帮助我解决了很多问题:


希望有帮助。

当我遇到这种情况时,是因为ssh代理不再运行了。我重新启动了它,并在运行
ssh add-L