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

前端 未结 13 1763
借酒劲吻你
借酒劲吻你 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:38

    1.Double tap on finder select "Go to folder" enter /Users/Shared/Jenkins/Home

    2.Check the "secret" folder , right click and select "get info"

    3.Click on "lock" icon and enter admin password and make change in view type (change into user view) after this your folder is accessible .

    4.Do same for password text file also

    0 讨论(0)
  • 2020-12-24 11:43
    1. Navigate to this folder /Users/Shared/Jenkins/Home
    2. Right click on secrets/ folder and select "Get Info"
    3. Scroll down to the right bottom corner of the pop up window and click on the lock image > enter your password > ok
    4. Click on the "+" at the left bottom corner of the pop up window and add the user 4.5 Click on Settings icon - left bottom and Apply changes.
    5. Open the "secrets" folder and find the initialAdminPassword file to get the initial admin password. If you don't have permission to the file, you need to right click on the file and select "Get Info" then repeat step 3 and 4 above to access the file.
    0 讨论(0)
  • 2020-12-24 11:46

    If you have installed Jenkins through HomeBrew, check

    sudo cat /Users/$(whoami)/.jenkins/secrets/initialAdminPassword

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

    The current user might not have permissions to Secrets folder to access the initialAdminPassword file. So give permission by selecting "Secrets" folder by CMD+ i which launches a new screen and then unlock and then provide required permissions.

    Locked file

    Unlocked and Access to initialAdminPassword file

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

    Try it

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

    and copy the password.

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

    In my case, I was looking for this on MY MAC, but what you actually have to do is ssh to your docker container.

    docker ps
    

    which will display the containers, then copy the id of the container you created,

    then do

    docker exec -it <paste-id-here> /bin/bash
    

    If that's successful, you will see your terminal change to, then you can run:

    cat 
    
    0 讨论(0)
提交回复
热议问题