Monday, February 5, 2018

Github Troubleshooting

# git push fails with the following

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

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

Steps
0. copy your public key to github.com
cat ~/.ssh/id_rsa.pub  >> copy the content

1. go to github.com > settings > ssh and gpg keys > new ssh key > paste your public key there > save

Try git push again. 

1 comment:

  1. Permanently authenticating with Git repositories,
    Run following command to enable credential caching:

    $ git config credential.helper store
    $ git push https://github.com/repo.git

    https://stackoverflow.com/questions/6565357/git-push-requires-username-and-password

    ReplyDelete