Skip to main content
Ask A Question
Notifications
You’re not receiving notifications from this thread.
Subscribe

Why is github permission denied after adding deploy keys?

Rails • Asked by Ethan Groat

I followed every single tutorial, and tried multiple different methods of authenticating my server's access to the github repo. All of it results in the same error, permission denied.

Last few lines after running cap roduction deploy:

  INFO [4dcb4df3] Running /usr/bin/env git ls-remote git@github.com:EthanGroat/re-reddit.git HEAD as ethan@167.172.211.24

 DEBUG [4dcb4df3] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.3" GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-re-reddit-production-ethangroat.sh" ; /usr/bin/env git ls-remote git@github.com:EthanGroat/re-reddit.git HEAD )

 DEBUG [4dcb4df3]   git@github.com: Permission denied (publickey).

 DEBUG [4dcb4df3]   fatal: Could not read from remote repository.

I'm going quite insane. This stuff is unjustly difficult to set up, and there needs to be a more comprehensive guide. I followed both capistrano's and github's guides to the letter.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 30,242+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.