How to reset the user credentials for Jenkins on Mac OS (Sierra)
For macOS, the config.xml file is located in:
/Users/<USERNAME>/.jenkins
As the other post says, change:
<useSecurity>true</useSecurity>
to
<useSecurity>false</useSecurity>
Run the following command to find the Jenkins username and encrypted password
cat /Users/{USERNAME}/.jenkins/credentials.xml
if you want to reset the password please follow the below steps
1.Use command – $ vim /Users/{USERNAME}/.jenkins/config.xml
file.
2.Go to <useSecurity>
tag and check value, it will be true
.
- Press
i
so it file will be in insert mode. Then you can update the file. You need to update<useSecurity>
tag value tofalse
as below.
4.Save this file and exit from file. Press Escape
and then enter :wq
– to save updated file )
5.Once you are done with updating value in config.xml file. Restart Jenkins service. Use command ( $ brew services Restart Jenkins
)
6.Now open Jenkins URL. It will go to dashboard direct. No any credentials required. You can see after opening dashboard ‘Logged in user’ section will be blank. As it is now Anonymous user.
7.Now, Delete old admin users. To do that go to People option in left hand side bar.
Users config located in:
/Users/{USERNAME}/.jenkins/users/jenkins/config.xml