GitHub ssh keys - ssh test works but using git clone returns permission denied
04:59 26 Jan 2022

I've been working on this for a few hours now and I've read everywhere but am officially stumped.

I'm trying to set up ssh keys for a dev-environment to interact with github. I've followed the guide on github and have made the keys and when I test them using the git@github.com it works but when I use git clone git@github.com:username/repo I get

Cloning into 'reponame'...
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.

I've tried adding it to ssh-add and that works, ssh-agent is running and has access. I've looked at the environment variable and set it to ssh among a few other things. I don't know what else to try. Let me know what logs I can post to help.

My thoughts are maybe the git command isn't using the identities or the right ssh client but other than the environment variables I'm not sure what else to change.

Thanks for the help in advance.

github ssh-keys centos8