It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Authentication in Sourcetree error when pushing to bitbucket server Edited

I have connected Sourcetree (Windows version 3.1.2) to my companies bitbucket server and can fetch and pull from remote repos but when I push commits I get an authentication error.

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
fatal: Authentication failed for 'https://{username}@bitbucket.{company}.com/{repo path}
Pushing to https://{username}@bitbucket.{company}.com/{repo path}
Completed with errors, see above.

 When I configure my account I get a "Authentication OK" message after I have typed in my password. It seems like the password is not being stored and the request is being sent with an incorrect password.

I am able to push to the repo using the git on the CLI.

1 answer

0 votes
minnsey Atlassian Team Mar 20, 2019


If the remote repositories are private then you will need valid credentials to pull/fetch. Is it possible there are different permissions on the repo for read vs write? Do you have write permissions to that repo?

I do have read/write permissions and I've verified this by pushing via the git CLI. It seems like there is a bug in Sourcetree where the password is not saved correctly and send when a push is initiated. I am not having the same issue is Sourcetree for Mac.

minnsey Atlassian Team Mar 25, 2019

Can you try clearing out any 'git:' and 'Sourcetree:' prefixed entries from the Windows Credential Manager, this will remove any potentially bad credentials, forcing Git to re-prompt you and then store the new credentials.

I tried this but I am still getting the same auth error and I am still able to push via git push on the command line.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Bitbucket Server 7.0 is here!

Hello Community, I’m Anton Genkin, a product manager on the Bitbucket Server and Data Center team and am excited to share that Bitbucket Server 7.0 is now available! It's a platform release, one th...

1,066 views 6 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you