Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add a username and password to Jenkins?

Tags:

jenkins

When I go to mydomain.com:8080 there is no authorization mechanism by default. I have had look at the configuration area but cannot find anywhere to add a basic username and password

like image 948
Hoa Avatar asked May 30 '12 23:05

Hoa


People also ask

How do I bind credentials in Jenkins?

In Jenkins, go to your pipeline project. Click Pipeline Syntax to open the Snippet Generator. From the Sample Step dropdown menu, select withCredentials: Bind credentials to variables. In the Bindings section, select Add > Username and password (separated).

Can we setup credentials to login into Jenkins dashboard?

You can find your password for Username=admin. Password should be located in: $JENKINS_HOME/secrets/initialAdminPassword. You can view the password using: cat /var/lib/jenkins/secrets/initialAdminPassword.


1 Answers

Go to Manage Jenkins > Configure Global Security and select the Enable Security checkbox.

For the basic username/password authentication, I would recommend selecting Jenkins Own User Database for the security realm and then selecting Logged in Users can do anything or a matrix based strategy (in case when you have multiple users with different permissions) for the Authorization.

like image 108
CIGuy Avatar answered Oct 14 '22 05:10

CIGuy