1

I am using Git GUI (or Git CMD) for Windows 10, and have previously pushed a git repository to my GitHub account. That is, I have an SSH key associated with my Git account. Today I am unable to push new changes to that same repository. I receive the error:

Pushing to git@github.com:[username]/[project_name].git
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

Daniel H
  • 7,223
  • 2
  • 26
  • 41
Andy
  • 29
  • 4
  • Does `ssh git@github.com` from Git Bash produce a message like "Hi ! You've successfully authenticated, but GitHub does not provide shell access." – rlee827 Oct 23 '17 at 22:41
  • Possible duplicate of [GitHub Error Message - Permission denied (publickey)](https://stackoverflow.com/questions/12940626/github-error-message-permission-denied-publickey) – phd Oct 23 '17 at 23:05
  • No, `ssh git@github.com` produces the message "git@github.com: Permission denied (publickey)." – Andy Oct 23 '17 at 23:11
  • Then you did not register your public key correctly. Do that again. – Thorbjørn Ravn Andersen Oct 24 '17 at 02:16
  • You are right. Deleting my SSH key on GitHub and re-adding it did the trick. – Andy Oct 24 '17 at 15:20
  • However, it appears that I have to delete and re-add the SSH key every day. Why would that be? – Andy Oct 25 '17 at 15:42

0 Answers0