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

Unable to Authenticate

shanegoddard February 7, 2018

For the Love of God do NOT tell me to do all the stuff, I've already done.  I've applied every fix on this site.  I can log into BitBucket just fine.  My account authenticates in Sourcetree just fine.  I deleted ALL of my passwords in my vault... still nothing. 

 

Here is what I have done:

I've tried the following, without success:

  • removed the username from the remote URL in Repository / Repository Settings / Edit origin;
  • and from the Username field;
  • replaced the username with my account's email;
  • removed all of my saved credentials from Tools / Options / Authentication;
  • recreated the credentials for my Bitbucket account (which has been verified during the process);
  • set said credentials as default;
  • uninstalled and reinstalled SourceTree.

PUSHING does not ask for my password, why would it, it authenticates.  Changing from HTTPS to SSH does nothing.

 

Please, Please, Please tell me what to do.  Do I need a new laptop?  At this  point, I am ready to try.  It worked fine 3 days ago, for the last 2 it has not.  I have not upgraded, I changed my password in Bitbucket/Jira, and now I can't get in.

 

I tried basic authenication, I tried the other authenication, they both work and authenticate me... UNTIL I TRY TO DO MY JOB

 

1 answer

0 votes
Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2018

Hello! Could you give me more details about the error you're seeing? A screenshot would be great. Thanks!

shanegoddard February 7, 2018

failure to authenticate.gifAuthenticate.png

shanegoddard February 7, 2018

I CAN get the Authentication to work using HTTPS and SSH.  As well as Basic and OAuth... it authenticates there, but as soon as I try to pull OR push it fails.

Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2018

If auth fails when trying to pull or push, then it's because git is not using the correct credentials (and seeing as you've changed your password, then it probably still using the old one). I suspect that there's still some credentials in the Windows Credential Manager that's being used. Can you try the following?

 

  • Remove any 'git' prefix credentials from the Windows Credentials Manager
  • Open the command-line and run "git config --list" and verify that "credential.helper=manager" is present
  • If so, then run "git credential-manager clear" which will delete all saved credentials
  • Try and push again, you should now get prompted for credentials
shanegoddard February 7, 2018

All removed...

I got the following both with --list and as seen below


C:\Users\sgoddard>git config
'git' is not recognized as an internal or external command,
operable program or batch file.

The other git one is not going to work since git is not working

tried to push ... and same error

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.
fatal: Authentication failed for 'https://bitbucket.org/pgi-jira/dbdev-manual-update-scripts/'
Pushing to https://bitbucket.org/pgi-jira/dbdev-manual-update-scripts

Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 8, 2018

Seems like you don't have a system-wide install of git on your machine. That's OK: you've got 2 options:

  • Install git for windows (and make sure the setting for adding git to PATH is checked)
    • If you install git for windows system-wide, make sure the "Use system git" button is toggled in Options -> Git
  • OR, run the commands again, but make sure you directly reference the git exe, which is located in "C:\Users\YOUR USERNAME\AppData\Local\Atlassian\SourceTree\git_local\bin\git.exe"
shanegoddard February 8, 2018

tried the second one, and found the git.exe... but I don't have that credential manager listed.

 

I installed it and found the manager, and cleared it.  Was SO hopeful... only to be kicked in the Jimmy.

Opened SourceTree and tried to push:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.
fatal: Authentication failed for 'https://bitbucket.org/pgi-jira/dbdev-manual-update-scripts/'
Pushing to https://bitbucket.org/pgi-jira/dbdev-manual-update-scripts

Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 8, 2018

Did you set Sourcetree to use System Git after installing it?

systemgit.PNG

 

If that still doesn't work, could you try adding your username to the remote repo URL?

  • Open the repo
  • Click "Settings"
  • Double click on the origin entry
  • Modify the URL / Path to include your username so that it looks something like this: "https://USERNAME@bitbucket.org/contoso/app.git"
  • You should now be prompted for a password
shanegoddard February 8, 2018

I was missing a step...  I did the use System GIT and did the clean thing again, it asked for the URL, I put one of the 10 in and bam... it asked for my password.  

Thank you.  3 Days of messing with this doesn't seem like a good thing.  Maybe there should be an easier way for sourcetree to ... I don't know... Work?  

Thank you for your help!!!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events