I am on Ec2 with the base amazon ami linux- I have installed jenkins but when I go to pull the repo from github I am given the following error:
Building in w
I'm using a single jenkins machine to check out multiple github repositories and had similar problems when setting it up. What I ended up doing was configuring an SSH config file for jenkins so that SSH would automatically know which id file to associate with each repository.
/var/lib/jenkins/.ssh/config:
Host github-ABC
HostName github.com
User git
IdentityFile /var/lib/jenkins/.ssh/id_rsa_ABC
In the Jenkins project config under source code management, I used this as the repository name:
git@github-ABC:user/repo.git
Finally, I use the SSH public key as a deploy key in the github repository.