wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
- Jenkins will be launched as a daemon up on start. See /etc/init.d/jenkins
- The 'jenkins' user is created to run this service.
- Log of Jenkins is placed in /var/log/jenkins/jenkins.log
- Default configurations are set in /etc/default/jenkins
- Browse Jenkins by :8080
Manage Jenkins -> Manage Plugins -> Available, to filter the following keywords:
- Git plugin
- GitHub plugin
Manage Jenkins -> Configure System -> Git plugin
- Global Config user.name Value
- Global Config user.email Value
sudo su jenkins
ssh-keygen -t rsa
cat /var/lib/jenkins/.ssh/id_rsa.pub
- Create a new SSH key and paste id_rsa.pub
- Confirm if the user
jenkins
can login into Github via SSH
ssh -vT [email protected]
sudo: no tty present and no askpass program specified
sudo chmod +w /etc/sudoers
sudo vi /etc/sudoers
- add the line to /etc/sudoers
%jenkins ALL=(ALL:ALL) NOPASSWD:ALL
- Add SSH keypair /var/lib/jenkins/.ssh/id_rsa.pub into launchpad
stderr: Host key verification failed
sudo su jenkins
git ls-remote -h git+ssh://<launchpad-id>@git.launchpad.net/<project.git> HEAD
[1] https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu