Stash backup client - 401 Unauthorized

I have been unable to get the backup client working. I get the error "A backup could not be created. Reason: The Stash version could not be verified; the server returned 401 Unauthorized.".

This is odd because /rest/api/latest/application-properties is available to un-authenticated requests, returning {"version":"2.8.2","buildNumber":"2008002","buildDate":"1381752258426","displayName":"Stash"}

I have stash.user set to a dedicated user with ownership of the installation & home dir's.

What am I doing wrong?

Please advise.


2 answers

1 accepted

0 votes
Answer accepted

Hi Brent,

Thanks for your response.

I had tried both a stash user & a system user in, but I had been enclosing the password in quotes which caused the the same issue regardless - oops.

It's all working now.



1 vote
Brent Plump Atlassian Team Nov 06, 2013

Hi Rich,

There are two users involved in the backup:

  1. The OS user that runs the backup client - This user needs to have ownership of the Stash home directory.
  2. A user in Stash with system admin privileges - The backup client uses this user's credentials to lock Stash and request a database backup.

It sounds like you've put the OS user in the file instead of the Stash system admin user.

If that doesn't help or I've misunderstood you, please raise a support request and we'll help figure this out:

-- Brent

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

309 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you