Difference between revisions of "Jenkins"

From Wasya Wiki
Jump to: navigation, search
Line 28: Line 28:
 
  <passwordHash>#jbcrypt:$2a$10$razd3L1aXndFfBNHO95aj.IVrFydsxkcQCcLmujmFQzll3hcUrY7S</passwordHash>
 
  <passwordHash>#jbcrypt:$2a$10$razd3L1aXndFfBNHO95aj.IVrFydsxkcQCcLmujmFQzll3hcUrY7S</passwordHash>
 
  The password is test
 
  The password is test
 +
 +
=== better password reset ===
 +
From: https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-reset-jenkins-admin-users-password/
 +
sudo vi /var/lib/jenkins/config.xml
 +
<useSecurity>false</useSecurity>
 +
sudo service jenkins restart # or
 +
sudo systemctl restart jenkins
 +
 +
* Click on People on the left-hand navigation menu.
 +
* Click on the Admin.
 +
* Delete the user account.
 +
* Navigate to Jenkins / Manage Jenkins.
 +
* Click on Configure Global Security
 +
* Check the Enable Security check box
 +
* Under Security Realm, select Jenkins’ own user database
 +
* In the Authorization section, select Logged-in users can do anything.
 +
* Unselect Allow anonymous read access.
 +
* Click Save to save your changes.
 +
* jenkins will ask you to create first admin user

Revision as of 17:26, 17 January 2022

Install

From: http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/

Install Java

From: https://jenkins.io/doc/book/installing/#linux

wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins

Jenkins config

password reset

/var/lib/jenkins/users/username/config.xml
<passwordHash>#jbcrypt:$2a$10$razd3L1aXndFfBNHO95aj.IVrFydsxkcQCcLmujmFQzll3hcUrY7S</passwordHash>
The password is test

better password reset

From: https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-reset-jenkins-admin-users-password/

sudo vi /var/lib/jenkins/config.xml
<useSecurity>false</useSecurity>
sudo service jenkins restart # or 
sudo systemctl restart jenkins
  • Click on People on the left-hand navigation menu.
  • Click on the Admin.
  • Delete the user account.
  • Navigate to Jenkins / Manage Jenkins.
  • Click on Configure Global Security
  • Check the Enable Security check box
  • Under Security Realm, select Jenkins’ own user database
  • In the Authorization section, select Logged-in users can do anything.
  • Unselect Allow anonymous read access.
  • Click Save to save your changes.
  • jenkins will ask you to create first admin user