Adding Your First Site
You authentication token or password is saved as encrypted in user’s home folder. It is more secure than saving it in plain text format, but can be hacked if someone has access to site configuration file. Home folder of each user is normally not accessible to other users, but it is advised to check permissions of your home folder just in case.
Since all commands expects a target site either specified with ‘--site’ flag or through default site configuration you need to add a site before using CLI. Adding a site is interactive operation and CLI will prompt you for site URL, username/email etc.
jira config add
✔ Site URL? · http://jira.example.com
✔ Alias for the site? · dc2022
Checking site...... Done
✔ Username? · admin
✔ Do you want to use token instead of password (recommended)? (Y/n) · false
✔ Password? · ********
To use the CLI, user doesn’t need to be an administrator, they can use any command if they granted permission in the Jira. They can’t do anything which their permissions in Jira doesn’t allow. Although you can try to run any command with any user, only the operations your account has permission to execute will be completed successfully. If you don’t have permission for an action you will receive “Not Permitted” (401/403) response from Jira.
After adding a site, you can also make it the default site, so that you don’t need to specify it every time using --site=my-site when running commands:
jira config set-default dc2022
Adding a Cloud Site
If you have a license for Forge version of the add-on for your cloud site, you can also use command line tool to access it.
You can’t use username/password combination for accessing Jira Cloud. You need to create a TOKEN for your account and use that TOKEN together with your email to authenticate. You can refer here to learn more about generating personal access tokens in Jira.
You also need to provide the webtrigger URL manually. To get the webtrigger URL, execute the following command within the embedded terminal (Apps->AtlasCLI Terminal):
~$ webtrigger
https://c4038762-112e-4ed3-b333-123323e31132e.hello.atlassian-dev.net/x1/_2EhEzFa_iu3n8zKRTY2dfe1x1aWR
User doesn’t need to be an administrator, they can use any command if they granted permission in the Jira. They can’t do anything which their permissions in Jira doesn’t allow.
Adding a Server/DC Site
You can use username/password combination to add an on-premise site. Starting from Jira 8.20, you can also use authentication tokens in addition to username password combination. The CLI will detect which version of Jira you have after entering the URL and give you option to use authentication token. We recommend you to use authentication token instead of password.
For Server/DC instances you can optionally enable JMX Monitoring as explained here. When you enable JMX monitoring you can get more information about the server using ‘jira server-info:jmx’ command.