Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Export fails with 'You are not permitted to access this resource'

We have Bitbucket version `7.21.2`

This is the export documentation for this version:

The documentation says this:
> There’s no graphical user interface in the initial (Bitbucket Server 5.14) release of this feature. Instead, REST calls can be made to control the migration process.

This is what it says to do to trigger the export for a project:
> curl -u <adminusername> -s -n -X POST -H ‘Content-type: application/json’ -d ‘{“repositoriesRequest”:{“includes”:[{“projectKey”:“”,“slug”:“”}]}}’ http://localhost:7990/rest/api/1.0/migration/exports | jq .

The documentation specifies that I have to use the admin user (which I am). I created a PAT using this documentation:

My permissions for the token are set as following:
* Project permissions: admin
* Repository permissions: admin

I am calling the API using the following command:

curl --request POST \
--user my.user:MY_TOKEN_FROM_SETTINGS \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"repositoriesRequest": {
"includes": [
"projectKey": "SOME_KEY",
"slug": "SOME_SLUG"
And this is the error that I am getting back:

{"errors":[{"context":null,"message":"You are not permitted to access this resource","exceptionName":"com.atlassian.bitbucket.AuthorisationException"}]}%

I tried sending gibberish in the user field to verify that that is correct and the response is actually different:

{"errors":[{"context":null,"message":"Authentication failed. Please check your credentials and try again.","exceptionName":"com.atlassian.bitbucket.auth.IncorrectPasswordAuthenticationException"}]}%

What am I doing wrong here?

0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events