The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Sourcetree authentication not working for all bitbucket repositories

Gonzalo_AC3E
Contributor
March 19, 2024

Hello,

last year after Bitbucket change the authentication method from personal password to App Paswords I managed to update my sourcetree Account so that pushing to repos works well for many of the repos I have access to.

Unfortunately, now that I need to make a push to a repository I did not use for more than a year and I found an issue I cannot figure out why I am not able to push my commits to only that repo.

I even had created  new App Paswords with all posible permissions enabled but the push error is the same:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v origin master:master
remote: Invalid credentials
fatal: Authentication failed for 'https://bitbucket.org/Gonzalo_AC3E/labdsp_elo314_utfsm.git/'
Pushing to https://Gonzalo_AC3E@bitbucket.org/Gonzalo_AC3E/labdsp_elo314_utfsm.git
Completed with errors, see above.

As the others repositories works well for my pushings, I will comment the differences of this repo compared to the others

  1. Repos that I can push are private, the problem now is with a public repo
  2. Repos that I can push are part of a Workspace of an organization my acount is associated with. The problematic repo is part of my free personal Bitbucket account
  3. The problematic repo only is 48MB 

If I understand well, App password are created at my account level. I don't see options to create App passwords for a Workspace different from my personal repos. I cannot find either App Passwords that apply for a selected group of repositories and not for others.

As mentioned before, I have always used the Authentication of Sourcetree, many years ago I would used SSH but last years I use HTTP access using App Passwords

sourcetree_auth.JPG 

I have use Bitbucket along with Sourcetree for 6 years but few times I need to configure Authentication. Around once a year I end up all frustrated because something has changed in bitbucket, or i need to configure a new PC, etcetera and unfortunately is always a headache, because error mesaages are so brief an give little clue what is going wrong and in spite I always spend many hours understanding how all works, next time I face an issue I have forgotten how things work or the things have change already and feel I do not know a thing about it (again, each year)

Please, any help or good reference of how can I solve my problem will be appreciated.

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Gonzalo_AC3E
Contributor
May 31, 2024

I think I finally found something useful.

First I realize that making a git push form git bash console was posible without errors, so the problem should be in Sourcetree configurations, not the git config of the repo.

Then, I found answers for a similar question. This answer and its option (2) worked form me.

It seems that the newer versions of Sourcetree I installed kept using the passwd file from older installation (probably when userpasswords instead of applicationpasswords were used). After deleting it, and fetch form the repo, a popup appear asking me for the password, so I gave it the application password that I had configured before and all operations with this repo started working again as they should.

What a pain to get to this solution since the error that I got didn't mention there was a conflict between the old and new password formats.

0 votes
Gonzalo_AC3E
Contributor
May 31, 2024

I am still having the problem. Last time I realize i could use another PC where this problem does not exist.

Now I'm back worrking on the PC the problem is, but I install a newer version of Sourcetree. I even deleted the local repository, and cloned it from origin again to this PC.

But nothing has changed here: for some reason I still cannot do push because the exact same thing. 

Any suggestiòn?

DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events