Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Devops specified logon session does not exist

We use Azure Devops for our git repository and we previously had an issue every so often where we would get a "Terminal Prompts disabled" error. When we upgraded to Visual Studio (2019) version 16.8.1, this went away and all seemed fine. However, after about 2 weeks on this version I and some of our other developers are now getting this error:

Failed to push to the remote repository. See the Output window for more details.
Updating 7df912b..b4954c1
Git failed with a fatal error.
Failed to write item to store. [0x520]
A specified logon session does not exist. It may already have been terminated
POST git-upload-pack (909 bytes)
remote: Azure Repos        
remote: 
remote: Found 12 objects to send. (9 ms)        
From https://dev.azure.com/myOrg/_git/myApp
   7df971b..b4958c1  master     -> origin/master

Sometimes it will also say that it failed and to check the Output window. When I go to check the error, it will say "check the output window" in the output window itself with no further error message. I have tried clearing my git credential tenant.cache file and IdentityService folders in AppData, but have had no luck. The most odd thing though is that all of the pushes and pulls seem to still work. Has anyone experienced either of these errors?

like image 465
SausageBuscuit Avatar asked Dec 22 '22 16:12

SausageBuscuit


2 Answers

I had the same issue, which emerged when I updated to version 16.8.1 and continued after I updated to 16.8.2. I was able to resolve it by going to Tools > Options > Source Control > Git Global Settings and changing the "Credential Helper" value from "Unset" to "GCM for Windows".

enter image description here

like image 142
indot_brad Avatar answered Jan 06 '23 19:01

indot_brad


You can try below possible workarounds.

1, It could be caused by the git version shipped with Visual studio.

You can replace the Visual studio git extension with the latest git version:

  • Navigate to C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git --> Remove the Git folder

  • Dowload the latest Git version and Install it to above folder C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git

Or you can try modify your visual studio to use the Git for windows:

  • remove the Git folder in above ..\TeamFoundation\Team Explorer\Git path.
  • Visual studio 2019 installer → modify → single components--> Check Git for windows
  • Install latest git version on your windows and configure the environment path.

2,Clearing the cached credentials from Credential Manager. And then try again.

Go to Credential Manager--> Windows Credentials--> Remove all Git related credentials.

3,You can also try reconnect to your azure devops project from Visual studio.

Go to Team Explorer-->Right click your azure devops project and Click remove-->Click Manage Connections to reconnect to your azure git repo.

enter image description here

4, Remove the cached credential in Registry.

Open Registry Editor-->Navigate to Computer\HKEY_CURRENT_USER\Software\Microsoft\VSCommon\14.0\ClientServices\TokenStorage\VisualStudio\VssApp remove all the entries inside VssApp.

Please check this thread for more solutions. You can check out this thread.

like image 29
Levi Lu-MSFT Avatar answered Jan 06 '23 19:01

Levi Lu-MSFT