不能推git,visual studio.Git因致命错误而失败.致命:遇到HttpRequestException

Zal*_*mar 36 git visual-studio-2017

这是我在visual studio上的错误.我无法弄清楚是否有配置来解决这个问题.另外,我被限制安装git命令行工具.

Error encountered while pushing to the remote repository: Git failed with a fatal error.
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
error: cannot spawn askpass: No such file or directory
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Run Code Online (Sandbox Code Playgroud)

Lac*_*lov 32

只需将Visual Studio更新到最新版本即可修复.为我工作.

  • 谢谢Lachezar.具体来说,VS 2017版本15.5.7(发布时间为2/20/18)提到了此修复:"我们已更新Git和Git Credential Manager组件" (4认同)
  • 我首先尝试了这个答案,但必须先更新Windows版Git,然后才能再次使用。 (2认同)

小智 30

原因: GitHub在服务器端更新了他们的安全要求.他们不再支持TLS 1.0和1.1,只有1.2.用于Windows版本的旧版Git Credential Manager使用1.0.

解决方案:更新Windows的Git.版本2.14.3和更新版本包括最新的Windows Git凭据管理器.

或者,您只能更新Windows自身的Git Credential Manager.它从版本1.14.0开始支持TLS 1.2.

  • 这是一个很好的信息,但既然你应该更新VS,Lachezar的答案对我来说效果更好.Updaing VS确实解决了你所谈论的所有问题,而不必以手动方式使用我的系统. (7认同)
  • VS Update为我做了 (3认同)
  • 对我而言,它是通过将两个dll文件即libeay32.dll和ssleay32.dll从<VS_INSTALL> \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TeamFoundation \ Team Explorer \ Git \ mingw32 \ bin \复制到“ < VS_INSTALL> \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TeamFoundation \ Team Explorer \ Git \ mingw32 \ libexec \ git-core \“文件夹 (2认同)