Problem
CLI User is facing remote error while using Confluence cloud.
Error Message
Remote error: User is not authorized to perform the request. Response code: 401.
Environment
Application | Confluence |
---|---|
Version | Cloud |
Application | JIRA Software |
Add-on Version | 8.4.0 |
Cause
As per the recent GDPR guidelines issued by Atlassian, there is a change in the authentication parameters for the Cloud.
Solution
In order to overcome this issue, please follow the below steps:
Download CLI client 8.5.0 from this location.
Use the Email address as username and token as password.
A. In order to create a token: Click on your profile avatar on the bottom left corner.
B. Click on Profile --> Manage your account --> Security
C. Under API token, click on Create and manage API tokens (If you see a blank screen, refresh the page Or open this in another browser)
D. Then click on the button Create API token.- A token is created that needs to be copied and kept securely. Use it as --password parameter.
Linux:
java -jar /opt/atlassian/cli/atlassian-cli-8.5.0-SNAPSHOT/lib/jira-cli-8.5.0-SNAPSHOT.jar --server https://your-site.atlassian.net --user "john@example.com" --token rg97a5s4agsjsd732 "$@"
Windows:
java -jar D:\CLI\atlassian-cli-8.5.0-SNAPSHOT-distribution\atlassian-cli-8.5.0-SNAPSHOT\lib\jira-cli-8.5.0-SNAPSHOT.jar --server https://your-site.atlassian.net --user "john@example.com" --password "jLBdxOCRPvsiOdu0XiBcA088" %*
- Make sure the username and password are updated in all the CLI files/scripts wherever you have username and password parameters.