Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using API tokens to connect to workspace

sterraf June 25, 2025

Hi,
I have followed the instructions to create a scoped API token. I have tested all the permissions available increasingly, from `admin:repository:bitbucket` up to all the five permissions available for such tokens, and none of them was sufficient to accesss my repository through the suggestions here.

In each and every case I got the following error:

$ git push origin
remote: Your credentials lack one or more required privilege scopes.
fatal: no es posible acceder a [REDACTED]: The requested URL returned error: 403

Note: Here I using the token with the most permissions, and it indeed shows that it has been used at my account's info page.

1 answer

1 accepted

1 vote
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2025

Hi Sterraf,

The first thing you should check is to make sure you are using the correct username - you can access your username by clicking the gear cog icon > Personal Bitbucket Settings and checking the username under the Bitbucket Profile Settings heading.

I would also advise you to try to create a token temporarily that has access to all permissions (in case you have not yet done so) for testing purposes.

Once this token is configured and you have the correct username, try cloning into seperate locations following both the formatting examples given on the page:

git clone https://{bitbucket_username}@bitbucket.org/{workspace}/{repository}.git

git clone https://x-bitbucket-api-token-auth@bitbucket.org/{workspace}/{repository}.git

Once you've succeeded, ensure you update the remote URL.

Please let me know how this goes.

Cheers!

- Ben (Bitbucket Cloud Support)

sterraf June 27, 2025

Hi Ben, thanks for your answer.

I double-checked my username and successfully cloned the repo using the first suggestion---I seem to have my password saved on my Git configuration.

I then changed the remote url and had the same problem.


The second format, however, did not go through. I tried the usual password and both of the API tokens (the weak one and the one with all permissions) the former is not recognized and the latter both give 403.

So I think I'm back to square one. What do you suggest?

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 29, 2025

Hi @sterraf 

This is not something that can be easily assisted with in a public forum such as community - so we'll need to raise a support ticket on your behalf for further assistance.

May I know your timezone so I can raise one with a team member whose working hours match yours?

Cheers!

- Ben (Bitbucket Cloud Support)

Like sterraf likes this
sterraf June 30, 2025

Yes, I'm on GMT-3. Thanks a lot

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 30, 2025

Hi @sterraf 

I've raised a ticket with the EMEA support region, you should receive an email from them shortly with next steps :)

Cheers!

- Ben (Bitbucket Cloud Support)

Like sterraf likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events