All threads / Why is github permission denied after adding deploy keys?

Ask A Question


You’re not receiving notifications from this thread.

Why is github permission denied after adding deploy keys?

Ethan Groat asked in Rails

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 [email protected]:EthanGroat/re-reddit.git HEAD as [email protected]

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

 DEBUG [4dcb4df3]   [email protected]: 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.

Did you find a solution to this, I am having the same issue

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 49,679+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.