Forums

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

Authentication in Sourcetree error when pushing to bitbucket server

jbburf
Contributor
March 20, 2019 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
Atlassian Team members are employees working across the company in a wide variety of roles.
March 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?

jbburf
Contributor
March 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.

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 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.

jbburf
Contributor
March 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
TAGS
AUG Leaders

Atlassian Community Events