I'm running Jenkins on an AWS Amazon Linux 2 EC2 instance.
I have setup the instance and have jenkins running as well. I'm currently trying to add the job to deploy my private repo (Django web app) to the EC2 instance.
I have used ssh-keygen
and placed the public key in my github SSH keys and the private key in my credentials within Jenkins.
I have been researching and almost every source does exactly what I've been doing.
Any ideas on how to resolve this? I know that github changed some of their login capabilities in the last few years, so i'm not sure if these posts are outdated.
This is the error I'm getting
You can see my credentials config below:
And my github ssh key here:
I have verified that I am able to authenticate from my EC2 instance via ssh -T git@github.com
(Jenkins still not authenticating):
I have also tried using a username/password authorization (private key as password), but that gives the exact same error:
Ok, so the issue was two fold:
I used my github username and a generated token from github as my password (settings -> developer settings -> personal access tokens -> classic -> generate new token)
sudo yum install git
which git
(/usr/bin/git). Manage Jenkins -> Tools -> git installations -> (see screenshot belowAnd now we're good to go!