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!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Bitbucket Export using curl in Windows



I am working on the document below.

Exporting | Bitbucket Data Center and Server 8.4 | Atlassian Documentation

Since I am in a Windows environment, I am trying to execute the following curl statement after installing curl and jq, but it fails.


curl -u admin -s -n -X POST -H 'Content-type: application/json' -d '{"repositoriesRequest":{"includes":[{"projectKey":"*","slug":"*"}]}}' http://localhost:7990/rest/api/1.0/migration/exports/preview | jq .


I changed it to double quotation marks and the inner double quotation marks should be wrapped with \, so I changed it as below, but it still fails.


curl -u admin -s -n -X POST -H "Content-type: application/json" -d "{\"repositoriesRequest\":{\"includes\":[{\"projectKey\":\"*\",\"slug\":\"*\"}]}}" http://locahost:7990/rest/api/1.0/migration/exports/preview | jq .

Does anyone know how to do it?

1 answer

1 accepted

0 votes
Answer accepted
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 22, 2022

Hi Levi,

the command won't work like that because it's trying to redirect output to jq using the Linux pipe syntax. If you drop | jq . from these commands it should work.



Premier Support Engineer


Hi Christian,

Thank you for the reply.

Unfortunately, another problem has.
There is an error that the account clearly has admini permission but cannot be accessed.

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

What did I miss here? It is questionable whether it is possible in a Windows environment.

Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 23, 2022

Hi Levi,

I suppose you're trying to export from a Windows-based Bitbucket Server (not Data Center) instance? That should definitely work. Are you sure you are using a System Administrator account for this?



Premier Support Engineer



Bitbucket v7.8.0 / server 50 Users: Commercial License.

And 'admin' is bitbucket admin account. It login well from bitbucket instance.

Additionally, the reason why I need this is to migrate Bitbucket to another instance.(need pull request and comment history, etc)


Thank you

The -n option was the cause. The parameter is removed, so it works fine.

It was fine in a Linux environment, but it won't work in Windows if you have that parameter.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events