A few quick commands to setup Jenkins with a git repo, plus a troubleshooter when not working for Github or BitBucket on Ubuntu.
Jenkins SSH Key
sudo su jenkins
ssh-keygen -t rsa #(pressing return when prompted for a pass phrase)
cd ~/.ssh
cat id_rsa.pub
Git and Jenkin
If you get a git clone issues when building (The authenticity of host ‘bitbucket.org) try the following steps.
- SSH into the server
- change the user to jenkins
sudo su jenkins
- ssh git then a warning should come up, type yes
ssh [email protected]
- return back to normal user
exit