course-jenkins-getting-started icon indicating copy to clipboard operation
course-jenkins-getting-started copied to clipboard

Pipeline localhost:7080

Open haristiro opened this issue 3 years ago • 1 comments

Hi,

I set up the localhost 7080 but unfortunately i didn't save the initial password that the command line spat out for me and since then, every set up or even creation of the project from scratch is not giving me the new admin password. Is there a way to get the new one? The site is still showing me the dark theme though, it seems that it recognizes the port but no credentials are accepted.

Thank you Jenkins pipeline

haristiro avatar Oct 26 '21 09:10 haristiro

Couple ways... depending on what state is still around...

  • docker container logs JENKINS | grep -A 5 "Jenkins initial setup is required."
    • reads it from the jenkins container logs (if they're still around), -A grabs 5 lines after the grep match... which is plenty to show the line with the password on it.
  • docker container exec -i -t JENKINS cat /var/jenkins_home/secrets/initialAdminPassword - or even easier... exec in and cat out the passwd from file on disk (just swap in your jenkins container CID or name - where JENKINS is the exec command here and run it as is and it will print out the pass

If it's a user account you lost, let me know.

g0t4 avatar Oct 30 '21 14:10 g0t4