And you are sure the repository name and branch was correct? You did use something like
...
branch: main
repo: git@github.com:user/repo-name.git
...
And little general access test:
ssh -T git@github.com
Hi jasperf! You've successfully authenticated, but GitHub does not provide shell access.
Just really odd the error does not get resolved without adding the private key.
Also , check if agent forwarding is enabled in your local SSH config:
cat ~/.ssh/config
You should see something like:
Host yourserver
ForwardAgent yes
If missing, add:
Host yourserver
HostName yourserver.com
User your-ssh-user
ForwardAgent yes
I have
...
Host *
AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519
...
And two, ensure your SSH agent is running:
eval "$(ssh-agent -s)"
To check if your SSH key is added:
ssh-add -l
If empty, add your key:
ssh-add ~/.ssh/id_rsa