Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to "Unlock Jenkins"?

Tags:

jenkins

I am installing Jenkins 2 on windows,after installing,a page is opened,URL is:
http://localhost:8080/login?from=%2F

content of the page is like this:
enter image description here

Question:
How to "Unlock Jenkins"?

PS:I have looked for the answer in documentation and google.

like image 538
sunshine Avatar asked Mar 12 '16 17:03

sunshine


People also ask

Where can I find Jenkins admin password?

This password is stored inside the file initialAdminPassword , which is located inside your jenkins_home directory. The file, along with its full path, is displayed on the Jenkins page, as shown in the following screenshot: On Windows: You can find the file under C:\Program Files (x86)\Jenkins\secrets .

What is password for admin Jenkins?

"A default user "admin"with the instance-id as password is created to secure the Jenkins instance."

Can't start Jenkins service?

One of the most common reasons why Jenkins server can't start in Windows computers is because the version of the Java language was updated after the last shutdown of Jenkins server. In order to configure Jenkins to use the correct Java version, you can follow this procedure: 1. - Edit the jenkins.


2 Answers

Starting from version 2.0 of Jenkins you may use

-Djenkins.install.runSetupWizard=false  

to prevent this screen.

Accroding to documentation

jenkins.install.runSetupWizard - Set to false to skip install wizard. Note that this leaves Jenkins unsecured by default. Development-mode only: Set to true to not skip showing the setup wizard during Jenkins development.

More details about Jenkins properties can be found on this Jenkins Wiki page.

like image 136
Łukasz Gawron Avatar answered Sep 21 '22 18:09

Łukasz Gawron


Check https://wiki.jenkins-ci.org/display/JENKINS/Logging to see where Jenkins is logging its files.

e.g. for Linux, use the command: less /var/log/jenkins/jenkins.log

And scroll down to the part: "Jenkins initial setup is required. An admin user has been created ... to proceed to installation:

[randompasswordhere] <--- Copy and paste

Linux

By default logs should be made available in /var/log/jenkins/jenkins.log, unless customized in /etc/default/jenkins (for *.deb) or via /etc/sysconfig/jenkins (for */rpm)

Windows

By default logs should be at %JENKINS_HOME%/jenkins.out and %JENKINS_HOME%/jenkins.err, unless customized in %JENKINS_HOME%/jenkins.xml

Mac OS X

Log files should be at /var/log/jenkins/jenkins.log, unless customized in org.jenkins-ci.plist

like image 26
Rafael Avatar answered Sep 21 '22 18:09

Rafael