Forums

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

Push with authentication issues

zianliu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 9, 2025

I have reinstalled the sourcetree app. And now trying to click the push button within the app. However, I was shown this error message:

 

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v UI_integration_test master:main
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/...../...../...../'

Pushing to https://bitbucket.org/innofocus/ui_integration_test/src
Completed with errors, see above.

 

 

The real path was redacted by me on purpose here. Then I tried to create an API token for that with scope. And I can confirm it has repository read and write permissions. And copy and pasted the generated API token, but still failed to authenticate. Can someone help me from this out?

 

Thank you,

Leo

2 answers

0 votes
zianliu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 10, 2025

Hi Tomislav @Tomislav Tobijas ,

 

Thank you for your reply. I have just tried your suggested solution and tried to create a new API token with all the permissions ticked for Bitbucket. And copied that new API token with my bitbucket account, which is a google account. Still not working. 

I have also deleted the passwd file under:

C:\Users\<USER>\AppData\Local\Atlassian\SourceTree

 

The error message still says authentication error, I do not have permission to that repo. I tried with zianliu@bitbucket.org, and also my google account username, neither worked.

 

This issue after I reinstalled windows system and reinstalled sourcetree. Also, I am using my google account to log into the bitbucket. Would that be a problem too? 

 

Thank you

0 votes
Tomislav Tobijas
Community Champion
November 10, 2025

Hey @zianliu ,

I'd recommend checking the following answer on how you could authenticate to Bitbucket by using API token: https://community.atlassian.com/forums/Sourcetree-questions/Unable-to-authenticate-with-Bitbucket-since-moving-to-API-tokens/qaa-p/3143433#M46678

You could try to use "OAth" authentication as an alternative (also, try to remove any outdated or incorrect accounts).

Cheers,
Tobi

zianliu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 10, 2025

Hi Tomislav @Tomislav Tobijas ,

 

Thank you for your reply. I have just tried your suggested solution and tried to create a new API token with all the permissions ticked for Bitbucket. And copied that new API token with my bitbucket account, which is a google account. Still not working. 

I have also deleted the passwd file under:

C:\Users\<USER>\AppData\Local\Atlassian\SourceTree

 

The error message still says authentication error, I do not have permission to that repo. I tried with zianliu@bitbucket.org, and also my google account username, neither worked.

 

This issue after I reinstalled windows system and reinstalled sourcetree. Also, I am using my google account to log into the bitbucket. Would that be a problem too? 

 

Thank you

zianliu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 10, 2025

Update---

If I add an account with the gmail account with the created API token from SourceTree-->tools->option-->Authentication, it shows authentication OK.

But later when I click the push button, it still required me to enter the username and password. I enter the google email and the API token, it says authentication failed.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events