0

Im trying to fetch a raw VERSION file from a repository for a CD solution.

I created a Repository Access Token with Repository: Read permission, as documented here

Using cURL,

curl https://api.bitbucket.org/2.0/repositories/tests/sourcerepo/src/master/VERSION \
∙ -H "Authorization: Bearer $TOKEN" \
∙ -H "Accept: application/json"
{"type":"error","error":{"message":"You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated."}}

Using the same URL in Postman with Authorization set to Bearer with the access token, i get

{
    "type": "error",
    "error": {
        "message": "Token is invalid or not supported for this endpoint."
    }
}

I cant use username and password for this.

3
  • Is the endpoint correct? Commented May 7, 2023 at 3:48
  • @MB the same endpoint works with username App password authentication. Commented May 8, 2023 at 0:26
  • 1
    Why not use the app password then? Commented May 8, 2023 at 5:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.