可以打開.jenkins目錄下的config.xml文件,如果找不到這個文件可以全盤搜索一下,每個電腦環境不一樣,放的位置也不一樣。我的路徑在下面
C:\opt\webapps\hudson.war\users\changxj_890312467085258991\config.xml
打開后找到,要修改<passwordHash>...</passwordHash>中間的內容
<hudson.security.HudsonPrivateSecurityRealm_-Details>
<passwordHash>#jbcrypt:$2a$10$DdaWzN64JgUtLdvxWIflcuQu2fgrrMSAMabF5TSrGK5nXitqK9ZMS</passwordHash>
</hudson.security.HudsonPrivateSecurityRealm_-Details>
由於是hash加密的,我們不清楚是什么,可以重置一下密碼
修改為 123456,密文:#jbcrypt:$2a$10$MiIVR0rr/UhQBqT.bBq0QehTiQVqgNpUGyWW2nJObaVAM/2xSQdSq
也可修改為 111111,密文:#jbcrypt:$2a$10$QqzUz7kc8U8wkc5vexlxnuw5umudQj7A.0NmuZPrGMaq3qaV5m7hi
再登錄時用新密碼登錄即可