-1

I am trying to push my code in my local repository to github but I am stuck here:

$ git push origin master
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
  • 21,933
  • 14
  • 72
  • 101
  • Check this: https://help.github.com/en/github/authenticating-to-github/error-permission-denied-publickey – Daniel Mar 24 '20 at 05:11
  • 1
    Does this answer your question? [How to solve Permission denied (publickey) error when using Git?](https://stackoverflow.com/questions/2643502/how-to-solve-permission-denied-publickey-error-when-using-git) – Daniel Mar 24 '20 at 05:12

1 Answers1

-1

The problem maybe lies in your .git/config file so in my case i went ahead and deleted the .git file to re initialize it and followed the rest of the process to push my code to the remote repository and this time it worked.