当我使用capistrano 3进行部署时,我有一个错误,但它不是致命的,最终部署是成功的。
我的错误消息是:错误写入身份验证套接字
此错误消息显示了3次。
如下所示:
DEBUG [ac3445fe] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/my-project/git-ssh.sh /usr/bin/env git ls-remote -h git@github.com:me/my-project.git )
DEBUG [ac3445fe] Error writing to authentication socket.
DEBUG [ac3445fe] b9e8e722970ec7980e2062f481e7147bde7e7363 refs/heads/branch1
DEBUG [ac3445fe] 1a23c87450e24a83aa97c4765750c60d683ecf36 refs/heads/master
DEBUG [ac3445fe] fc070f0e7c0b44bb0ae519beced3e00cb0dbc6cb refs/heads/branch2
DEBUG [ac3445fe] 2936c7921bdae0003d845dde142bf8b11f29f0a3 refs/heads/branch3
DEBUG [ac3445fe] Error writing to authentication socket.
DEBUG [ac3445fe] Finished in 7.479 seconds with exit status 0 (successful).
这是:
DEBUG [2c4bb65f] Command: cd /var/www/my-project/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/my-project/git-ssh.sh /usr/bin/env git remote update )
DEBUG [2c4bb65f] Fetching origin
DEBUG [2c4bb65f] Fetching origin
DEBUG [2c4bb65f] Error writing to authentication socket.
我可以处理这个错误,但是如果我能解决它,会更好:)
发布于 2015-05-19 08:54:21
这似乎是ssh-agent
的一个问题。您正确启动ssh-agent
了吗?尝试:
ssh-agent bash
ssh-add /path/to/your/private_key
run-your-command-again
如果这样做有效,请确保操作系统正确启动ssh-agent
,并确保您的密钥在桌面会话启动时直接添加到其中。这将使你的生活变得容易得多,因为每次你打开一个新的终端时,你都不必重复上面的动作。当然,您可以将这些行添加到您的.bashrc
中,但是如果您已经用密码保护了您的密钥,那么每次打开一个新的shell时,您都需要键入密码。
https://stackoverflow.com/questions/23381331
复制相似问题