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
I install jenkins by img, use this command to cat password
sudo cat /Users/Shared/Jenkins/Home/secrets/initialAdminPassword
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 :
Type in your command prompt : docker ps
Find the running containerID
Type docker exec -it <containerID> bash
Type cd /var/jenkins_home/secrets
Type cat initialAdminPassword
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
ref:http://www.cimgf.com/2015/05/26/setting-up-jenkins-ci-on-a-mac-2/
Make the Jenkins user an admin: sudo dseditgroup -o edit -a jenkins -t user admin
Add the Jenkins user to the developer group: sudo dscl . append /Groups/_developer GroupMembership jenkins
Make the Jenkins user automatically login when the computer is restarted:
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
Note if you are running Homestead / Vagrant and Ubuntu
sudo cat /var/lib/jenkins/secrets/initialAdminPassword