I'm trying to push to my remote git on GitHub using SSH but keep receiving the error:
Pushing to git@github.com:foobar.git
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
I'm using OAuth and SSH to access Github via SourceTree. The SSH Key from the Account Settings in SourceTree is added in the "SSH and GPG Keys" settings on Github. Am I missing something obvious to get this to work?
Any help would be appreciate.
Hi @snhs1 ,
Sorry for responding this late. I'm not sure this problem has been fixed or not. The error can be for several reasons but definitely server rejecting the connection.
Could you please check this guide - https://docs.github.com/en/github/authenticating-to-github/troubleshooting-ssh/error-permission-denied-publickey and if you see that you don't see your public key in GitHub, you'll need to add it to Github - https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.
Could you please respond and accept the answer if it solves your issue?
Cheers
Suvradip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.