Ulli H Ulli H - 4 months ago 101
Git Question

GitHub: Permission denied (publickey). fatal: Could not read from remote repository

I´m having trouble with GitHub. I´ve playing around with a remote repository of Git.

When i now try to make any changes to the remote directory, i.e.

git remote show origin


or

git push -u origin master


i get this error


Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Ulrichs-MacBook-Pro:coredatatest ulrichheinelt$ git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.


I would be happy, when i could start again with a new (empty) remote directory. Or is there a way, to fix this error?

This are my first steps with GitHub, started yesterday...
Many thanks in advance!

Edit 1

my settings at https://github.com/UlliH/CoreDataTest/settings

...

Edit 2

too early happy :-(

After setting the SSH and GPG keys, the errors are still the same. :-/

Edit 3

i think that´s right so, but still the same...

enter image description here

Answer
  • On your GitHub profile there is an Edit Profile button.
    It is located on top-right corner of the webpage.
  • Press it and you will see left Personal Settings menu.
  • Inside that menu find SSH and GPG keys option and press it.
  • You will see an option New SSH key to add new key.