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

\[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.


Answers:
author: AdvAppSw
body: 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.

comments: author: Pellucid Dice
body: Works for me 7/12/2022

Thank you.


author: lfarswan
body: 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?


author: AdvAppSw
body: [@lfarswan](/t5/user/viewprofilepage/user-id/5096295) 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](https://community.atlassian.com/t5/image/serverpage/image-id/231794iEDE43393FE8B88C0/image-size/large?v=v2&px=999 "SourceTree GIT Embedded.jpg")


author: mbruned
body: 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.

comments: author: AdvAppSw
body: 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.