Forums

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

API Token not working with Sourcetree

Johan Thureson
April 13, 2026

This is for Sorucetree on Mac.

I'm on version 4.2.17 (311)

I'm following the instructions "Add an API token to Sourcetree or another application" here: https://support.atlassian.com/bitbucket-cloud/docs/add-an-api-token-to-sourcetree-or-another-application/

I am using HTTPS as protocol. (The instructions doesn't say anything there).

When I follow the instructions, i get

"Invalid username"

"Please enter your Bitbucket/GitHub username and not an email address."

 

Are the instructions wrong?

Did anyone get this to work?

2 answers

1 accepted

1 vote
Answer accepted
Johan Thureson
April 14, 2026

You have to have restarted your mac right before doing it. Trying a second time it won't work.

Using:

Auth Type: API Token

JohnHoover
May 12, 2026

Johan, I have the same problem, but restarting the mac did not help. Tried it several times after following the directions exactly. Was there anything else you did? I also deleted all the Keychain entries for Bitbucket, as suggested in some other posts. Thanks, John

Johan Thureson
May 13, 2026

Not that I can think of. Hope you can find a way. And that Atlassian does something to simplify this.

Johan Thureson
April 13, 2026

Then I get "Login error". 

"We couldn't connect to Bitbucket with your (...@...) credentials. Check your User Email and try the API Token again."

Tomislav Tobijas
Community Champion
April 13, 2026

@Johan Thureson are you using Bitbucket cloud or server? Those instructions I've put there were for the cloud app.

Also, I did test this on Windows and not sure if it will work on Mac 🤔

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events