Accessing credentials store from the Jenkins CLI before unlocking Jenkins

352 views
Skip to first unread message

Claudiu Guiman

unread,
Feb 21, 2017, 12:02:51 PM2/21/17
to jenkin...@googlegroups.com

Hi,
Is it possible to use the Jenkins CLI  to manage credentials before the user unlocks Jenkins? (copies the password from /var/lib/Jenkins/secrets/initialAdminPassword and creates a new account)

I can use certain commands like who-am-i by running

 java -jar jenkins-cli.jar -s http://localhost:8080/ who-am-i --username admin --password-file /path-to-copy-of-initial-admin-password

Authenticated as: admin

Authorities:

  Authenticated

 

But I can’t list credentials. Is it because the temporary admin account doesn’t have the right permissions?

java -jar jenkins-cli.jar -s http://localhost:8080/ list-credentials SYSTEM --username admin --password-file /path-to-copy-of-initial-admin-password

No such command: list-credentials

 

ERROR: You must authenticate to access this Jenkins.

Use --username/--password/--password-file parameters or login command.


Thanks,
Claudiu

Daniel Beck

unread,
Feb 21, 2017, 12:04:50 PM2/21/17
to jenkin...@googlegroups.com

> On 21.02.2017, at 18:02, 'Claudiu Guiman' via Jenkins Developers <jenkin...@googlegroups.com> wrote:
>
> But I can’t list credentials. Is it because the temporary admin account doesn’t have the right permissions?

Please use the jenkinsci-users mailing lists for questions like this.

https://jenkins.io/mailing-lists/

Reply all
Reply to author
Forward
0 new messages