Quick learning-Jenkins CLI users

user

jcli Can complete the user creation, deletion and token generation operations,

Create user

jcli user create <username> [password] [flags]

When creating a user, you can specify a password or randomly generate it.

Generate token

Jenkins' Web API must be accessed through a token, which jclisupports the generation of tokens for the current user or specified users. The command to generate a token for the current user is as follows:

jcli user token -g

If you want to use the administrator to generate tokens for other Jenkins users, you need to specify some parameters when starting Jenkins. For details, refer to the following commands:

jcli center start --admin-can-generate-new-tokens
jcli user token -g --target-user target-user-name

The first command above will start Jenkins and set it to allow users with administrator rights to generate tokens for other users.

Guess you like

Origin blog.csdn.net/weixin_42528266/article/details/108626641