Forums

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

API tokens just don't work

Spencer Ahn July 13, 2025

Hi,

 

So I read the notice on bitbucket app passwords, soon it will be deprecated and will be changed to API tokens. Did not read through the whole details and what is the deal, but I decided to give it a try.

 

It just doesn't work when I'm trying to clone a repo. I've copied the clone command from repo front page, and it asks me for a password.

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

I've copied the API token for the password but it says something like 

remote: 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.
fatal: Authentication failed for 'https://bitbucket.org/{workspace}/{repository}.git/'

I think I followed the steps exactly as written in the following link. I've tried waiting for 10 minutes after creating API token, but still no luck

Using API tokens | Bitbucket Cloud | Atlassian Support


Bitbucket app passwords still works fine in the same condition

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 14, 2025

Hi @Spencer Ahn 

To start using API tokens - you'll need to create the API token and specify the scope - this is mentioned in our deprecation documentation:

  1. Click the gear cog icon, select 

    Atlassian Account settings > Security tab > Create and manage API Tokens

  2. Click Create API token with scopes and select Bitbucket Cloud.
  3. If you want to be able to push/pull to the repository - you'll need to tick both 

    read:repository:bitbucket and write:repository:bitbucket 
    For clone only - this would just be read:repository:bitbucket.
    More information on scopes can be found in our API scopes documentation.

  4. Perform the clone using the API token by executing either of the commands below (if using the first command - you can find your username by clicking the gear cog icon and selecting Personal Bitbucket Settings - it's visible under the Bitbucket Profile Settings heading):
    git clone https://username:APIToken@bitbucket.org/workspaceID/reposlug.git
    git clone https://x-bitbucket-api-token-auth:APIToken@bitbucket.org/workspaceID/reposlug.git

Please perform the above and let me know how this goes. If you are still encountering issues, I will assist you further.

Cheers!

- Ben (Bitbucket Cloud Support)

 

Spencer Ahn July 15, 2025

This is exactly what I did. The same error msg from the original post happened.

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

Hi @Spencer Ahn 

Is it still prompting you to enter the password manually or is it immediately giving you that error message?

In any case - I'd suggest removing all your cached credentials in case some old credentials are causing interference (ie Credential Manager for Windows, Access Keychain for Mac or /etc/shadow folder for Linux) before trying to authenticate again.

If this is still not working - please let me know.

Cheers!

- Ben (Bitbucket Cloud Support)

Spencer Ahn July 15, 2025

Also done, I've tried removing credentials cache, and it still doesn't work. Wish there was a way to get more info on not being authenticated.

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

Hi @Spencer Ahn 

I've raised a support ticket on your behalf with our support team. Please note that as you are a member of a paid workspace - you can raise a support ticket directly with our team at any time:

I've set the timezone to GMT-7 based on past tickets that have been raised using this workspaceID. Please let me know if this is incorrect and I will adjust it accordingly.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

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

Atlassian Community Events