If you have forgotten your Jenkins administrator password, there are a few ways to reset it:

  1. Reset through the Jenkins interface:

    • Open the Jenkins interface in a web browser.
    • Click on the “Configure Jenkins” button in the top-right corner.
    • Scroll down to the “Administrators” section.
    • Click on the “Reset Password” button next to your username.
    • Enter your old password, then enter and confirm your new password.
    • Click “Save” to save the changes.
  2. Reset using the command line:

    • Open a terminal or command prompt.
    • Navigate to the Jenkins installation directory.
    • Run the following command to reset the administrator password:

sudo ./jenkins reset-password

	* Replace `<old-password>` with your old password, and `<new-password>` with your new password.
	* Press enter to reset the password.
3. Reset using the Jenkins CLI:
	* Install the Jenkins CLI tool by running the following command:
	
	
	```
sudo apt-get install jenkins-cli
* Run the following command to reset the administrator password:


```

jenkins-cli reset-password

	* Replace `<old-password>` with your old password, and `<new-password>` with your new password.
	* Press enter to reset the password.

After resetting your password, you can log in to the Jenkins interface with your new password. If you have any trouble, you can refer to the official Jenkins documentation for more information.

更多推荐