How do I get initial admin password for jenkins on Mac?

前端 未结 13 1837
借酒劲吻你
借酒劲吻你 2020-12-24 11:12

I installed jenkins by downloading jenkins-2.2.pkg. After the installation is complete, Chrome auto-connected to http://localhost:8080/login?from=%2F and I see

相关标签:
13条回答
  • 2020-12-24 11:53

    I install jenkins by img, use this command to cat password

    sudo cat /Users/Shared/Jenkins/Home/secrets/initialAdminPassword
    
    0 讨论(0)
  • 2020-12-24 11:53

    If you have installed Jenkins using Docker and you are not able to find the password using the command :

    $ sudo cat /Users/Shared/Jenkins/Home/secrets/initialAdminPassword

    Then do following steps :

    1. Type in your command prompt : docker ps

    2. Find the running containerID

    3. Type docker exec -it <containerID> bash

    4. Type cd /var/jenkins_home/secrets

    5. Type cat initialAdminPassword

    0 讨论(0)
  • 2020-12-24 11:55

    If you are using jenkins image from dockerhub repo and create a container then you can get the initial password using:

    $ sudo docker exec jenkins_containerid cat /var/lib/jenkins/secrets/initialAdminPassword
    

    OR if installing from jenkins.io docs (https://jenkins.io/doc/book/installing/):

    $ sudo docker exec jenkins_containerid cat /var/jenkins_home/secrets/initialAdminPassword
    

    OR you can see the docker logs of container

    $ sudo docker logs jenkinscontainerID
    
    0 讨论(0)
  • 2020-12-24 11:56

    ref:http://www.cimgf.com/2015/05/26/setting-up-jenkins-ci-on-a-mac-2/

    1. Make the Jenkins user an admin: sudo dseditgroup -o edit -a jenkins -t user admin

    2. Add the Jenkins user to the developer group: sudo dscl . append /Groups/_developer GroupMembership jenkins

    3. Make the Jenkins user automatically login when the computer is restarted:

    0 讨论(0)
  • 2020-12-24 11:58

    If you homebrew installed JENKINS, then by default, JENKINS_HOME is at ~/.jenkins This is also the location where you will find you will find your initial password inside the secrets folder.

    So: cd ~/.jenkins cd secrets open initialAdminPassword

    0 讨论(0)
  • 2020-12-24 12:02

    Note if you are running Homestead / Vagrant and Ubuntu

    sudo cat /var/lib/jenkins/secrets/initialAdminPassword
    
    0 讨论(0)
提交回复
热议问题