0

Made such a sequance of commands:

eval `ssh-agent -s`
Agent pid 1287

ssh-add D:\\Programming\\Python\\python_folder_key

git remote -v
origin  git@github.com:devmafia/Python_Django_Udemy.git (fetch)
origin  git@github.com:devmafia/Python_Django_Udemy.git (push)

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.

Don't really understand what's wrong in my sequence:

  • similar SO question https://stackoverflow.com/questions/13509293/git-fatal-could-not-read-from-remote-repository – sagar1025 Jan 31 '21 at 19:12
  • Have you uploaded `D:\\Programming\\Python\\python_folder_key.pub` to your account (`devmafia`) at github.com? – phd Jan 31 '21 at 19:15
  • Thanks! now I added it to the folder where I wanted to push, I just didn't do it before, everything works. – Alexander_Sky Jan 31 '21 at 21:15
  • This is how Github describes this in their docs: [Adding a new SSH key to your GitHub account](https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account) – hakre Jan 31 '21 at 22:08
  • Yes, it does, thanks! – Alexander_Sky Jan 31 '21 at 22:17

0 Answers0