Monday, February 5, 2018

Updating Mac OS X messed up my git ssh settings

I recently updated to Mac OS High Sierra (10.13). Yeah, I know, it's been out since last year. But I finally got around to updating my laptop.

And then when I tried to git push, I got an error:


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.
 Which was weird because I was able to create the remote repo. I just couldn't push to it.

I investigated my ssh key situation, and it appears the Mac OS upgrade removed my github key. Luckily, I had the key still in my ~/.ssh directory and was able to rectify the situation with:

ssh-add ~/.ssh/github_user-GitHub
Then all was good again. Whew!

No comments: