git pull失败,"应用程序未调用WSAStartup,或WSAStartup失败"

Nic*_*oul 12 git github winsock github-for-windows wsastartup

我刚刚安装了Windows 10,Visual Studio Community 2015和Git for Windows.我还安装了最新的Bitbucket和GitHub扩展.

在Visual Studio中,我克隆了我的Bitbucket.com托管的存储库,并成功执行了这些操作:

$ git --version
git version 2.19.2.windows.1

$ git pull
Already up to date.
Run Code Online (Sandbox Code Playgroud)

但是当我试图从另一个存储库中提取时,我收到了这个错误:

$ git pull git://github.com/aegif/CmisSync.git
fatal: unable to lookup github.com (port 9418) (Either the application has not called WSAStartup, or WSAStartup failed. )
Run Code Online (Sandbox Code Playgroud)

我能ping通github.com.

我该如何调查并解决问题?

Phi*_*lly 16

对于那些无法编辑URL的人,将git降级到以前的版本似乎有效.

这似乎是git版本的问题 2.19.2.windows.1

  • 正确.关联的GitHub问题:https://github.com/git-for-windows/git/issues/1952 (3认同)
  • 正如GitHub问题中所述,您还可以下载已包含此问题修复程序的[最新快照](https://wingit.blob.core.windows.net/files/index.html).显然在12月的某个日期之前不会有另一个适当的发布. (2认同)

Nic*_*oul 11

低技术的解决方法是更换git://https://的URL.
然后命令顺利进行.

警告:

  • 它只能以只读方式工作,因此如果您希望将来随时推送到存储库,请使用PhillyAI的解决方案.
  • 请注意,虽然它目前可以与GitHub一起使用,但这个技巧可能不适用于其他Git服务器.


小智 7

这是 Windows 版 Git 早期版本中的一个已知错误。

升级/安装版本大于 2.20.0.

您可以使用命令检查当前安装的版本 $ git --version