Visual Studio 2017 - Git 失败并出现致命错误 [英] Visual Studio 2017 - Git failed with a fatal error

查看:91
本文介绍了Visual Studio 2017 - Git 失败并出现致命错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2017 社区版 (CE),并且我已登录我的 Microsoft 帐户并连接到 VSTS.我可以看到我所有的项目和存储库,但是当我尝试拉/取/推送任何更改时,我收到以下错误:

I am using Visual Studio 2017 Community Edition (CE), and I have signed into my Microsoft account and I am connected to VSTS. I can see all my projects and repositories, but when I attempt to pull/fetch/push any changes I get the following error:

Error encountered while pushing to the remote repository: Git failed with a fatal error.
PushCommand.ExecutePushCommand

相应地,对于 fetch 和 pull 命令也是如此.

And accordingly for the fetch and pull commands too.

我在 Visual Studio 2017 安装程序上安装了适用于 Windows 的 Git,它不仅无法与 VSTS 一起使用,而且我也无法使用我的任何 GitHub 存储库.有没有其他人注意到这一点?到目前为止,它发生在我的两台机器上.

I installed Git for Windows on the Visual Studio 2017 installer and not only is it failing to work with VSTS, I am unable to work with any of my GitHub repositories too. Has anyone else noticed this? It's happened on two of my machines so far.

Visual Studio 2015 企业版 (EE) 和 CE 对我来说完全没问题.

Visual Studio 2015 Enterprise Edition (EE) and CE work completely fine for me.

这个问题似乎得到了比我认为的更多的认可,这让我相信这是 Visual Studio 如何处理 Git 的问题.我还注意到,每次更新 Visual Studio 时,这个问题都会再次出现,我必须通过下面的一些答案中的步骤才能让 Git 再次工作.我不确定为什么会发生这种情况,也不知道 Microsoft 是否计划解决此问题.

It seems that this issue has gotten far more recognition that I thought it would which leads me to believe that this is an issue with how Visual Studio is dealing with Git. I have also noticed that every time I update Visual Studio, this problem pops back up, and I have to go through the steps in some of the answers below to get Git working again. I'm not sure why this is happening, and I also don't know if Microsoft are planning to resolving this issue.

推荐答案

在我从控制面板更改通用凭据后→ 用户帐户Credential Manager forGit,它对我有用.

After I changed the generic credentials from Control PanelUser AccountsCredential Manager for Git, it worked for me.

这篇关于Visual Studio 2017 - Git 失败并出现致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆