Default credentials for Jenkins after installation

旧城冷巷雨未停 提交于 2019-12-05 00:06:59
pat

Username is admin. Password should be located in:

$JENKINS_HOME/secrets/initialAdminPassword

You can view the password using:

cat /var/lib/jenkins/secrets/initialAdminPassword

or

cat $JENKINS_HOME/secrets/initialAdminPassword

If you're using Jenkins inside of a Docker container, like I am, the following commands might be useful.

docker exec -it ${jenkins_container_name} \
    cat /var/jenkins_home/secrets/initialAdminPassword 
# or if it was the last container you ran
docker exec -it $(docker container ls -l --format "{{.Names}}") \
    cat /var/jenkins_home/secrets/initialAdminPassword

After Installation of Jenkins 2.Y.Z, I would suggest you to simply restart your OS.

my OS is Windows 8.1, and as after I restarted Jenkins automatically builds it installation environment, and you can see many directories and files available or appeared which were not available instantly after installation.

Now, Open Jenkins Dashboard path in web browser hostname:portnumber

for beginners it is like localhost:8080

it will ask you the password.

So, open the file initialAdminPassword in text editor or viewer located in:

C:\Program Files (x86)\Jenkins\secrets\

copy the 32 chars length password, and paste it to the Jenkins Dashboard.

Later you can install the plugins default or in custom choose mode.

Hope this would help many one.

I had this exact issue as well. After installing Jenkins, the installation directory just had some config files and the jre and bin folders. After rebooting Windows 10 I was able to see all the normal folders you would expect in a Jenkins installation:

  • jobs
  • jre
  • logs
  • nodes
  • plugins
  • secrets - The "secrets" folder only appeared after rebooting, and in it was initialAdminPassword just as promised.

Now going to http://localhost:8080 loads the "Unlock Jenkins" page.


Really, though. I should have known to reboot. It is Windows after all...

open the door

sudo chmod -R 777 secrets

peek inside

vi secrets/initialAdminPassword

close the door

sudo chmod -R 700 secrets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!