Unlock Jenkins - how to

天涯浪子 提交于 2020-01-24 10:21:27

问题


I have installed jenkins on my ec2 instance using putty, from my windows system

When I try to access jenkins through web, I get the Unlock Jenkins using /var/lib/jenkins/secrets/initialAdminPassword enter image description here How to get to this location as if accessing through putty, I get permission denied to this folder.

Please advise, I am new to ubuntu and jenkins


回答1:


My solution is similar to the one by Mark B, I viewed the secrets by executing the cat command on the initialAdminPassword file.

However, I was not able to use cat to view the password until I gave my user permission.

Initially jenkins was the only user that had permissions to do anything with the secrets folder. I tried logging into the jenkins user account but could not. I executed:

sudo chmod a+rwx ./secrets

to give myself permission to view that directory.

As some background information, it might seem weird that I would give myself permission to "execute" a directory, but that is necessary in order to view its in the terminal using ls.

Also, my account is an admin account. I am running MacOS 10.11.4. Hope that helps.




回答2:


Try accessing the file using sudo:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword


来源:https://stackoverflow.com/questions/42426111/unlock-jenkins-how-to

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