I need to use PowerShell instead of WSL for one of my projects. I wanted to set up my terminal to use ssh instead of entering my credentials each time.
I've done this successfully in the past on WSL, but it seems OpenSSH is giving me trouble on PowerShell. When I try to perform a simple push command to a completely new repo, I'm given the following 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.
Here's where things start getting weird... I've followed all of the steps outlined in GitHub's article on this very subject, and everything suggests that I'm good to go.
Here's what I've done:
Checked to make sure
ssh-agent
is running. It is.Ran
ssh -vT git@github.com
. It's using port 22, and I getHi [MyUsername]! You've successfully authenticated, but GitHub does not provide shell access.
at the very end.Verified that
ssh-add -l -E md5
does have the correct public key.Verified that the public key spit out by
ssh-add
above is the exact same as the one I've added to my GitHub account.Despite step 1, checked to make sure that my key was actually being found. Indeed, it is (second line):
...
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in C:\\Users\\aleks/.ssh/known_hosts:1
...
I'm honestly stumped and out of ideas. What's going on?