Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git failed with a fatal error. Failed to write item to store #245

Closed
suthishnairs opened this issue Dec 4, 2020 · 11 comments
Closed

Git failed with a fatal error. Failed to write item to store #245

suthishnairs opened this issue Dec 4, 2020 · 11 comments
Labels
platform:windows Specific to the Windows platform

Comments

@suthishnairs
Copy link

When trying to clone GIT repo, getting below error from Visual Studio

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 (214 bytes)
remote: Azure Repos
remote: remote:
Found 3 objects to send (17ms)

Tried in both the versions of Visual Studio Enterprise 2019 16.7 and 16.8.

16.7: Tried to clone multiple times, sometimes all the files gets downloaded but above error still pops up.

16.8: No download or cloning happening, same error.

I tried recreating Azure personal access token, also added an Generic Credentials into Windows Credentials.

Nothing worked, any help here, please.

Using: Visual Studio Enterprise 2019 & Git-2.29.2.2-64-bit

@mjcheetham
Copy link
Collaborator

Hi @suthishnairs, are you running Visual Studio as a different user? (either via runas or, right-click Run as Admin/OtherUser)?

Are you using any other remoting technologies to sign-in to Windows, such as SSH, Remote Desktop, etc?

@suthishnairs
Copy link
Author

suthishnairs commented Dec 7, 2020

Hi @suthishnairs, are you running Visual Studio as a different user? (either via runas or, right-click Run as Admin/OtherUser)?

Are you using any other remoting technologies to sign-in to Windows, such as SSH, Remote Desktop, etc?

Hi @mjcheetham, Yes, I open Visual Studio as "Administrator". Actually, am under Administrator privilege's group.
Using SSO (Azure DevOps).

Also, I can clone, pull, push etc. through Git command lines, but not using Visual Studio.

@mjcheetham mjcheetham added the platform:windows Specific to the Windows platform label Dec 9, 2020
@vtbassmatt
Copy link
Contributor

@mjcheetham is this in the GCM Core stack, or is it failing someplace else in Git before it gets to us? (Wondering if we need to get our friends in VS involved.)

@Nikhilnick1203
Copy link

Hi.
I'm facing the same issue. Is this issue resolve? If yes, could you please help me out

@suthishnairs
Copy link
Author

@mjcheetham @vtbassmatt

If we clone the repo from browser using option "Clone button" and select IDE as "Clone in
Visual Studio", the repo download will be successful.
So it seems browser authenticates the VS IDE to download the repo.

But, if we try to clone directly from VS, the Git authentication window pops up and mentioned error comes.

More seem an authentication or authorization issue.

@rashtripathy
Copy link

I am facing the same error, each time I try to clone I get the error below:
"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"

Can anybody help?

@SudhansuNayak
Copy link

I am also facing the same error whenever I try to Sync, I tried all option install a new version of git, checked the permission, clone the solution, clear cache etc. but still no luck. Please suggest.

Git failed with a fatal error.
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

@nonbob
Copy link

nonbob commented Jun 22, 2021

I'm seeing the same thing in a remote PowerShell session. I thought it might be a two-hop problem and that CredSSP might fix it but. . .no. Tried installing the very latest (user) version of GCM. No dice. Tried running it as a task with user credentials (which often helps work around logged-in context issues). No dice. It's almost like it's specifically expecting something that's only in context when the session is associated with a GUI.

That said, the actions that I need seem to be happening (I'm doing a sparse checkout - git init, remote, config, write info/sparse-checkout, pull). Lots of red ink, but it seems to be working in spite of that.

[later. . .reading some more about GCM, I see that it's specific to a small set of git implementations (the most common ones) and the one we're using (Gitea) is not supported. I just upvoted Add support for Gitea #145 https://github.com//issues/145]

@vtbassmatt
Copy link
Contributor

With #464 (which will land in the next release of GCM Core), folks should be able to work around Windows Credential Store problems by enabling DPAPI mode. That should address all the remote scenarios where we can't store credentials.

Watch this space for a release, and we'll close the issue once it goes out.

@mjcheetham
Copy link
Collaborator

The latest release supports a DPAPI-based credential store on Windows that should work in these scenario.
Please see here for more information on how to change the credential store.

Closing.

@suthishnairs
Copy link
Author

The latest release supports a DPAPI-based credential store on Windows that should work in these scenario. Please see here for more information on how to change the credential store.

Closing.

Yes, Thank You, this worked !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:windows Specific to the Windows platform
Projects
None yet
Development

No branches or pull requests

7 participants