I am trying to migrate some repositories from one instance of Bitbucket Data Center to another. I am following the documentation here: https://confluence.atlassian.com/bitbucketserver063/data-center-migration-972354918.html. We are currently at BBDC 6.3.x.
Here is the curl command I am using:
curl -s -n -X POST -H "Authorization: Bearer <personal-access-token>" -H 'Content-type: application/json' -d '{"repositoriesRequest":{"includes":[{"projectKey":"YOYODYNE","slug":"test-repo-01"}]}}' https://<bitbucket-instance-com>/bitbucket/rest/api/1.0/migration/exports/preview | jq .
I am getting the following response:
{
"errors": [
{
"context": null,
"message": "You are not permitted to access this resource",
"exceptionName": "com.atlassian.bitbucket.AuthorisationException"
}
]
}
I created the project/repo with my own account so I'm not sure why I'm getting an authorization error.
I've also tried basic auth and that doesn't work either. Does the migration tool work? If so, can anyone tell what I'm doing wrong?
Just after I clicked Publish, I figured it out. Tokens are not supported and I messed up my Basic Auth on the command line. I knew as soon as I asked the question I'd figure it out. Sorry for the clutter on the site.
How did you figure out that the Tokens are not supported? Any docs stating that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.