Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

fatal: Authentication failed for 'https://bitbucket.org/<FOLDER>/<REPO>.git/

AdvAppSw November 3, 2022

[Using SourceTree 3.4.10 under Windows 10]

When attempting to push a commit, it fails with this messge:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin Working:Working
remote: Login failed due to incorrect login credentials or method.
remote: If you are unsure of which login details or login method to use, visit:
remote: https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/
fatal: Authentication failed for 'https://bitbucket.org/<FOLDER>/<REPO>.git/'


Pushing to https://bitbucket.org/<FOLDER>/<REPO>.git
Completed with errors, see above.

 

This, despite:

  • Having successfully pushed commits earlier in the day without errors.
  • Being able to click "Repository > View repository online" and having it connect and display the repository in  my browser.  So, it clearly can reach the repository.

 

2 answers

1 accepted

5 votes
Answer accepted
AdvAppSw November 10, 2022

I switched from the "embedded" git and to a system git (provided by Visual Studio) and it works without complaining.

I tried several things before this step, including updating the embedded (to clear out the settings) and then selecting each of the available Credential Authentication methods.  Every one of those provided the same error as found in the original submission.

Pellucid Dice
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!
December 7, 2022

Works for me 7/12/2022

Thank you.

lfarswan
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!
December 16, 2022

I am getting the same Authentication failure. Tried to uninstall and reinstall Sourcetree but it didn't work. I am also trying to switch to system git as suggested here but it doesn't allow me to change from embedded to system git. How can we switch to system git? Is there any other trick behind it?

AdvAppSw December 22, 2022

@lfarswan Nothing special -- screen shot, below.  You can see that I'm currently set to use the "System" Git -- the [System] button is disabled (since it is already selected) and the text below it displays "System Git version 2.38.1..."

If I click the [Embedded] button (which is enabled), it would switch to the "Embedded" version of Git.

SourceTree GIT Embedded.jpg

Like Ameralay likes this
0 votes
mbruned
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 13, 2022

Hello, I have the same issue. Is it not possible to login by using embedded git? It was previously working ok for me and I have set my app passwords, but sourcetree is always launching this error when trying to clone a project. 

AdvAppSw November 13, 2022

The embedded git was working for me in the morning of Nov 3 and then it quit working later in the day, and began presenting the error message in the original post.  My attempts to fix it (as noted in my answer) were not successful.  But, upon switching to using a "system" git located elsewhere, it began working and I've not had the error sense.

Something clearly got broken since: 1) SourceTree was working earlier on that day and then stopped, and 2) SourceTree continues to be able to access the repository when I select "View Repository".  So, it can clearly find the repository but I don't know why it fails to authenticate when I attempt to push a commit when using the embedded git.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events