If l accidentally leave recent builds of SourceTree running overnight, I arrive to hundreds of authentication dialogs tiled across the screen. Right clicking the toolbar icon and choosing `Close all windows` drops the current batch but then hundreds more start reloading. I have to repeat numerous times to restore order
SourceTree Version 3.0.6-beta-2193 but has been regularly occurring for a week or so
One dialog if authentication required
One dialog per SourceTree auto-fetch attempt
On a different work machine I upgraded to 3.0.8 during the brief window when it was available yesterday. I'm now running into similar behavior on this machine, albeit with a GCM rather than Bitbucket dialog. Frustratingly, my credentials don't work in this dialog but do work if I push/fetch from command line.
Again, it seems like SourceTree should be blocking until the dialog response concludes rather than spawning off all these processes asynchronously.
The dialog is coming from git itself -- it's trying to load remote repository details (Sourcetree attempts to refresh this every 10 mins which you can disable under Options) and is failing to do so which causes the prompt to appear. Not sure why it can't find your credentials and why your current one doesn't work. You'll probably need to log what the git-credential-manager is doing and find out why it can't find the credentials you're giving it.
GCM works without issue at the command line. I can't see how the problem is on their end when it works as expected on the command line and only Sourcetree produces the problem behavior.
On the new machine that started acting up after I upgraded yesterday, I followed the advice listed below and removed the Sourcetree passwd file from AppData. So far it's again working as expected. From what I observed, it seems like your passwd file is having an unexpected effect on your authentication requests.
>Not sure why it can't find your credentials and why your current one doesn't work
My credentials actually work. The dialog closes as you would expect on successful auth, but moments later I assume Sourcetree invokes a GCM request again because it's tracking the wrong state, or because of something in the passwd file that makes it assume auth failed.
I'm not entirely certain that SourceTree is responsible for these counts but it seems highly likely the Bitbucket login screens are related to the ophaned processes listed below. Before I reboot to try and make my machine usable again, the following seemingly orphaned processes are running after SourceTree and all applications are closed down:
git.exe: 762 instances
conhost.exe: 385 instances
Seems like the GCM is not set to the be the credential manager for git. Can you run the following command via the terminal and reply with the output:
git config --global
You should be looking for:
After doing that, can you open the Windows Credential Manager (go to 'Windows Credentials') and look for an entry with your username that looks something like "git:https://USERNAME@bitbucket.org" and verify that exists?
Additionally, can you verify that in Sourcetree the setting "Allow Sourcetree to manager my credentials via the Git Credential Manager" is checked (Tools > Options > Git)?
Really appreciate you continuing to think through this. My Bitbucket account may be at fault as at times in the past it also put up annoying dialogs that kept coming back after authentication. I usually go in and try to remove all cached credentials for Bitbucket after I connect to an old Bitbucket repo through Sourcetree (we moved to GitHub a few years ago). However, the new behavior is on a whole nother level and pretty much brings my computer to its knees if I leave Sourcetree open overnight.
GCM looks to be configured:
Allow Sourcetree to manage... is and was enabled.
Still getting the AskPass error in Sourcetree on the non-public repository. Fetch works without issue from the command line. Fetch works in Sourcetree on public repositories
Got it -- thanks. Okay, so in this case I'd recommend just removing all credentials related to Bitbucket from the Windows Credential Manager and then if prompted again enter your credentials and see if those get stored.
Regarding the missing AskPass exe -- we'll be shipping an update for that sometime next week. It's suppose to be deprecated due to the use of the GCM but it causes the git exe to hang forever. Sorry about that!
Oh, and I failed to follow up on the last part of your question. Yes cached credential entries exists in the Windows Credential manager for my Bitbucket account but as I mentioned, Sourcetree seems to be unable to use the cached credentials and often continues asking for Bitbucket auth for whatever reason. In the past this meant a single blocking auth dialog. This would drive me crazy but was just a quirk and bearable. When the dialogs don't block I get the hundreds of them.
I'll blow them away and see what happens
This behavior has been occurring on my work machine which as of last night was configured with System Git 2.19.0. Based on your recommendations I upgraded Git to 2.19.1. Unfortunately I'm now running into a blocking bug I've previously commented on (AskPass Error: No error) which prevents SourceTree from syncing successfully on some of my repositories until I switch to Embedded Git.
I haven't yet seen the error dialog but things aren't in their typical state given the Askpass error. Further, the naming of the component under error (AskPass) strongly suggests that it may have been responsible for the problematic behavior to begin with. If the blocking bug gets fixed and the errors don't resume, this issue may be resolved as suggested.
AskPass Error: No error
That askpass error is happening due to the git-credential-manager-for-windows not being triggered. Could you download the latest version of that and see if it fixes it? You can find it here:
Hello! This is probably an issue with the git-credential-manager-for-windows. I'd suggest downloading the latest version of git-for-windows, and making sure it installs the credential manager. Make sure Sourcetree is using 'System Git' (Options > Git). Then try logging in via one of those dialogs and it shouldn't prompt again.
Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...