We are running a Rails site and use github and capistrano for version control. We recently have taken off one of the developers as a collaborator on github and now when I am deploying (on the computer he was working on) I am receiv开发者_运维问答ing the following error:
** [beta.sitename.com :: err] ERROR: Permission to directory/sitename.git denied to [github username]. ** [beta.sitename.com :: err] fatal: The remote end hung up unexpectedly
I have changed both the public/private ssh keys within the .ssh folder and updated github with the new pub key. I have also updated the git config to use a new username/email. Any advice on how to deploy would be greatly appreciated.
Thank you.
It may be that the public key of the server beta.sitename.com needs to be added to GitHub as well?
I'm not entirely sure but it may be that the server's public key was associated to the previous developers account.
The error implies that it's beta.sitename.com is having trouble connecting to GitHub and not the machine you are deploying from.
If you have ssh_options[:forward_agent] = true
in your capistrano settings, then it is possible that the ssh agent is still using the old key. I'm not sure what the command is to reload the key, but restarting you computer should also work.
精彩评论