Unable to login to Jenkins even if I enter valid credentials.

+1 vote
Error: Invalid login information. Please try again.
Jul 2, 2018 in Jenkins by Tyrion anex
• 8,370 points
10,763 views

5 answers to this question.

+1 vote
Best answer

Disable security by editing these two classes within the config.xml file in the following way:

authorizationStrategy class="hudson.security.AuthorizationStrategy$Unsecured"/>
  <securityRealm class="hudson.security.SecurityRealm$None"/>
answered Apr 26, 2019 by Vedant

selected Apr 26, 2019 by Kalgi
Worked like a champ , thank you very much
Glad to help :)

When I am trying to edit the xml file it shows this error what should i do? PLease provide solution with details Its request I have a lot workload . How I can give permisssion And How to allow changes in config.xml?

Just try with administrator access. It will work.
+1 vote

This error occurs often, even when the credentials we enter are correct. A quick fix is to reconfigure security options in the config.xml file. The Jenkins config.xml file holds all the information related to the security realm and the authorization strategy. This file is located in the /var/lib/jenkins directory. One thing you must know is that, by disabling the security any anonymous user can access your Jenkins.

answered Jul 3, 2018 by Sophie may
• 9,940 points
+1 vote

By default, the security is enabled and if for some reason you’re not able to login to Jenkins dispite providing valid credentials then you can disable the security and authorization strategy. You can do this by editing the config.xml file and changing the following two classes

  • Security realm
  • Authorization strategy
answered Apr 26, 2019 by Pooja
0 votes

You can change the password by manually editing the configuration file for your user. (/jenkins/users/username/config.xml) and update the contents of passwordHash:

<passwordHash>#jbcrypt:$2a$10$razd3L1aXndFfBNHO95aj.IVrFydsxkcQCcLmujmFQzll3hcUrY7S</passwordHash>
answered Apr 26, 2019 by Barbara
0 votes
Weird but uninstalling and reinstalling worked for me! It's a lot of work and not the best thing to do.
answered Apr 26, 2019 by Peter
Tried using the initial password..(lengthy one!)... its worked..
How do I get the initial password?
  • 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.
  • cat $JENKINS_HOME/secrets/initialAdminPassword

Related Questions In Jenkins

+1 vote
1 answer

Unable to access Jenkins. I newly installed Jenkins but for some reason I cannot access it.

Try changing the port, Change JENKINS_AJP_PORT="xyz" to JENKINS_AJP_PORT="abc" If changing the ...READ MORE

answered Jul 4, 2018 in Jenkins by Sophie may
• 9,940 points
822 views
0 votes
1 answer

I’m facing a login error when I try to run Jenkins on Docker. How do I solve this?

You have to open the /var/log/jenkins/jenkins.log file to ...READ MORE

answered Jul 24, 2018 in Jenkins by Sophie may
• 9,940 points
705 views
0 votes
1 answer

unable to compile java code in Jenkins

If the code is compiling and running ...READ MORE

answered Apr 25, 2018 in Jenkins by DareDev
• 6,850 points
615 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
496 views
0 votes
1 answer
+2 votes
6 answers

Jenkins unable to run jobs (pending - waiting for next executor)

Increase the number of executors. I had ...READ MORE

answered Apr 24, 2019 in Jenkins by Maya
10,975 views
0 votes
2 answers