Bitbucket Server Backup Client - 401 Unauthorized

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

When the user tries to create a backup using the Bitbucket Server Backup Client, this error occurs in the command line: 

INFO Initializing
INFO Contacting Bitbucket Server
ERROR A backup could not be created. Reason: The Bitbucket Server version could not be verified; the server returned 401 Unauthorized. Backup/restore is only supported by Bitbucket Server 2.7.0 and later.

Cause

The Bitbucket Server Backup Client wasn't able to access Bitbucket Server due to insufficient user's privileges or due to bad authentication to Bitbucket Server.

The exact cause can be identified by enabling the debug log level for the Bitbucket Server Backup Client.

Cause #1 - Incorrect Password

Incorrect password
DEBUG -> 401 Unauthorized (@1EU3G03x936x11388x1)
DEBUG HTTP status code: 401, status text: "Unauthorized", headers: [Content-Type:[application/json;charset=UTF-8], Date:[Mon, 09 May 2016 05:36:25 GMT], Server:[Apache-Coyote/1.1], Transfer-Encoding:[chunked], Vary:[Accept-Encoding], WWW-Authenticate:[Basic realm="Atlassian Bitbucket"], X-AREQUESTID:[@1EU3G03x936x11388x1], X-ASEN:[SEN-7135831]]
2016-05-09 15:36:25,460 DEBUG REST call generated an unexpected HTTP error. Response body: {"errors":[
{"context":null,"message":"Authentication failed. Please check your credentials and try again.","exceptionName":"com.atlassian.bitbucket.auth.IncorrectPasswordAuthenticationException"}]}


Resolution

Cause #1 - Incorrect Password

  • Make sure the password is correct with no quotes enclosed.


Cause #2 - non System Admin user

  • Make sure the Bitbucket Server user specified in the backup-config.properties, has the Bitbucket Server System Admin Global Permission.

  • Check if backup user will require a captcha test by logging in via the gui before the backup scripts will be accepted. 


Last modified on Feb 13, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.