11.2.4.3 Credentials
When interacting with external resources like a git repository, various credentials will often be required to authenticate and authorize the build system. Jenkins credentials are handled by the credentials manager, and can be provided when a new server is created.
cicdw jenkins-server create --credentials [TYPE::]ID::USERNAME[::PASSWORD][::KEYFILE] ...
There are two types of credentials, usr_pwd
or
sshkey
.
usr_pwd
is the default, so the parameter --credentials
my_id::my_username::my_password
will be interpreted as
TYPE=usr_pwd
, ID=my_id
,
USERNAME=my_username
, PASSWORD=my_password
.
For the type sshkey
, the fourth element will be interpreted as the path
to a keyfile if only four elements are provided. With five elements, the fourth will be
interpreted as a password for the keyfile, and the fifth as the path to the keyfile.
One or more credential parameters can be listed after the --credentials
flag.