I am building a CI job that is supposed to call tower-cli, and have
noticed that:
$ tower-cli config
....
use_token: false
...
which leads me to believe there is a token-based authentication (vs
user-based authentication) for the tower? Or is it simply a reference to
token granted after user-based auth completed?
I've looked for references in
https://tower-cli.readthedocs.io/en/latest/#table-of-contents and other
places but came up with nothing thus far.
Am I supposed to manually create "CI" user and auth with those credentials?
Hi Dmitry,
You are correct, there is a token-based authentication now for tower-cli.
$ tower-cli login <your_username>
will prompt you for your Tower username and password, and will create an OAuth2 Personal Access Token on your behalf with that information. This will set the token value in the tower-cli config and will be automatically used for all subsequent tower-cli requests.
It is also possible for you to create an OAuth2 token yourself in tower and set it for tower-cli using the following command:
$ tower-cli config token <token-value>
Thank you for bringing this up, we could probably make a separate section in the docs for this. Currently this is our docs coverage: https://tower-cli.readthedocs.io/en/latest/quickstart.html?highlight=login and https://tower-cli.readthedocs.io/en/latest/cli_ref/index.html?highlight=login
Thanks,
Christian