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
@Tomislav Tobijas Thank you Tomislav for helping.
Finally I figured out the other way around. And now be able to commit the code now.
The steps are simple:
1. Delete SourceTree, Reinstall SourceTree
2. Readd the local repo through sourcetree
3. Click push. A window "CredentialHelperSelector" will pop up asking you to select one of the three crential helper:
A. <no helper>
B. wincred
C. manager
In my case. I just select C, and authenticate through web login, with my google account and google password. And it worked.
As to why using google account with the API token not work with <no helper> from SourceTree, I think I accidentally found a bug for SourceTree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@zianliu hmm... 🤔
So, if you navigate to https://bitbucket.org/ and expand your profile on the right side of the screen, what's the email you've got stated there? This is your email connected with your Atlassian account, which should then be used as a username when adding credentials to Sourcetree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tomislav Tobijas Thanks for your help. And By checking this info, I can confirm the email is the google email I use. I think this should be a bug that I found.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.