I have a repository that was initialized using HTTPS and am trying to switch it over to SSH. I'm working on a computer running Pop!_OS which is basically Ubuntu. I have generated keys following these instructions: https://gist.github.com/zhujunsan/a0becf82ade50ed06115
When I try to test the connection using sudo -u axiomtutor ssh -T git@github.com
it says my user is unknown. Which seems strange because I have set my user name globally in the terminal. When I try to push I get
ERROR: Permission to axiomtutor/asking.git denied to deploy key fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The content of my local .git/config
file looks like:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@github.com:me/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
I've run the ssh-agent and entered ssh-add -k ...
to add my SSH key to the path. I've put the key in the "Deploy Key" section of the settings on my repo. So I'm just not seeing what the issue could be.
Following these instructions didn't change anything: