Problem statement
The CLI client is seeing a remote error while accessing the cloud instance, as part of the platform changes related to GDPR.
Error message
Remote error: User is not authorized to perform the request. Response code: 401.
Environment
Application | Confluence, JIRA |
---|---|
Version | Cloud |
App version | 8.4.0 |
Cause
The error is caused due to the recent changes in the authentication parameters for the Cloud instance, as recommended by the GDPR guidelines issued by Atlassian.
Solution
CLI users must upgrade their CLI client to the latest version available to rollout GDPR platform changes. The Username and Password parameters accept only user email address and token respectively.
To generate the token:
Click your profile avatar on the bottom left corner.
Navigate to Profile > Manage your account > Security.
Under API token, click Create and manage API tokens (If you see a blank screen, refresh the page Or open this in another browser).
Click Create an API token. A token is created that needs to be copied and kept securely.
Perform the following to avoid the error:
Download CLI client 8.5.0 from this location.
Enter the following:
Username - User email address
Password - Token
Example for the Linux environment:
java -jar /opt/atlassian/cli/atlassian-cli-8.5.0/lib/jira-cli-8.5.0.jar --server https://your-site.atlassian.net --user "john@example.com" --token rg97a5s4agsjsd732 "$@"
Example for the Windows environment:
java -jar D:\CLI\atlassian-cli-8.5.0-distribution\atlassian-cli-8.5.0\lib\jira-cli-8.5.0.jar --server https://your-site.atlassian.net --user "john@example.com" --password "jLBdxOCRPvsiOdu0XiBcA088" %*
- Ensure the username and password are updated in all the CLI files/scripts wherever you have username and password parameters.
- Please refer to Atlassian Cloud Platform Changes Impacting CLI Users for further information on GDPR changes.