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

GitHub login continuosly required (2-factor authentication enabled)

Hi,

SourceTree continuosly requires to login. The gitHub login window appear when I ask "Pull" on SourceTree. I enter the credentials and then the code sent to my phone. It works.
A new personal access token has been added to my account every time.
10 minutes later it require to login again.

2-factor authentication was always enabled
SourceTree is set to use the system Git.
I tried to disable the "" in the Options/Git
I don't have any SSH key.
I authorized GOAuth fot SourceTreeForWindows today but the issue persists.

SourceTree v 2.6.10
Git v 2.17.1

Repositories are in private/corporation repositories registered on GitHub.
I use many repositories, mainly the the "Use default settings" is enabled.

This issues exists from a long time for my colleagues (at least 6 months) and started only the last month for me.

Regards,

Alex

1 answer

1 accepted

1 vote
Answer accepted
minnsey Atlassian Team Jul 13, 2018

Hi

It sounds like the Git process completes successfully when you do enter the credentials? If so that portion of  the Git Credential Manager for Windows (GCMW) is working.

The GCMW will store credentials under the key 'git:https://github.com' in the Windows Credential Manager, if you look you will see that there is no user information stored there, it is just credentials to use against GitHub, are you using more than one GitHub account? If so the GCMW will often find the wrong credentials, for the other account, when it tries them they will fail and the GCMW will delete the bad ones and prompt you for good  ones. Obviously the next time you try to pull from the other account the process repeats.

Is it possible you are hitting this?

Yes the git logins are successful.
Me and my colleagues have the same problem, sometime just ignoring that login window doesn't impede the pull/push.

I "touched" many git repositories registered in SourceTree and the problem seems to be solved.
It was probably related to the [user] data in the git configuration of one of that.
I reduced the number of open tabs and I set the "Use global user settings" for all (in Repository Settings/Advanced/User information).

Yes, I have 2 GitHub accounts. I have this problem only at the work pc, at home I use only my private GitHub account (without 2-factor auth).

Both the causes could have generated the issue but I haven't used my personal repos for a while and the problem starts suddenly. This make me think the problem was a wrong repos settings or the fact them were mixed (use global user settings and not).

A colleague still have the same problem, I suggested her to change all the repos to use the global user settings and reduce the open tab/repos to only a few. I think she does not have a private GitHub account.

I'll update this post the next week.

It is ok now for me.
I used CCleaner and I had to set the login for every repository again, but once done it is ok.


My colleague still have the problem. 
On SourceTree she set "use global user settings" but opening the options again shows the checkbox un-checked again. Also running SourceTree as Administrator.

Anyway thanks for the explanation.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,955 views 0 12
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