问题
I am using Git inside Visual Studio 2013. When I attempt to do any operation against a remote like fetch, pull, push, etc. I get the following error:
An error occurred. Detailed message: An error was raised by libgit2. Category = Net (Error). A specified logon session does not exist. It may already have been terminated
I was unable to find an answer but eventually found two work-arounds. I will post the work-arounds here.
I downloaded Git so I could use it outside of Visual Studio. If I ran git remote commands on the command line they worked just fine so the problem was not with git or my remote git repository.
Whenever I do a remote git operation through Visual Studio it uses the standard windows dialog to capture the password. I noticed that I would always get the error if the "Remember my credentials" box was checked. If I unchecked it, it would work fine.
回答1:
Unchecked "Remember My Credentials" checkbox.
Visual Stdio 2015 asked me enter credentials two times.
please uncheck above mentioned checkbox both the times. it worked for me
回答2:
Ran into this issue as well on VS 2015.
- Make sure that your repository location is correct in your Global Settings (this also would probably apply to Repository Settings, if you're in a situation where you're switching credentials).
- Your Windows Credential Manager may have stale credentials. See this question to resolve that issue.
来源:https://stackoverflow.com/questions/28356876/git-remote-operations-inside-visual-studio-2013-result-in-the-error-a-specified