4

When i make a deployment with capistrano 3, i have an error but it's not fatal and finally deployment is successful.

My error message is: Error writing to authentication socket

This error message was shown 3 times.

Like this:

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).

and this:

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.

I can work with this error but if i can resolve it, will better :)

RaKoDev
  • 613
  • 2
  • 7
  • 22

1 Answers1

1

This looks like an issue with ssh-agent. Have you started ssh-agent properly? Try:

ssh-agent bash
ssh-add /path/to/your/private_key
run-your-command-again

If this works, make sure that your OS starts ssh-agent properly and that your key(s) getting added to it directly on startup of your desktop session. This will make your life much easier since you won't have to repeat the action above again and again every time you open a new terminal. Sure you could add these lines to your .bashrc but if you've protected your secret key with a password you would then need to type the password every time you open a new shell.

hek2mgl
  • 152,036
  • 28
  • 249
  • 266