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

Ben Burford Mar 20, 2019

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
Michael Minns Atlassian Team Mar 20, 2019

Hi

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?

Ben Burford Mar 22, 2019

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.

Michael Minns 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.

Ben Burford Mar 25, 2019

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,688 views 1 18
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