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

问题描述 投票:12回答:4

我刚刚安装了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.

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

$ 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. )

我能ping通github.com。

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

git github winsock github-for-windows wsastartup
4个回答
16
投票

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

这似乎与git版本2.19.2.windows.1有关


8
投票

一个低技术的解决方法是用URL中的git://替换https://。 然后命令顺利进行。

警告:

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

4
投票

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

升级/安装版本大于2.20.0.

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


0
投票

我发现还有一个解决方案,即导航到.git文件夹,更改

[remote "origin"]
        url = git://github.com/yourUsername/yourRepo.git

[remote "origin"]
        url = https://github.com/yourUsername/yourRepo.git

如果不想降级git客户端,修复问题

© www.soinside.com 2019 - 2024. All rights reserved.