[英]git pull fails with “Either the application has not called WSAStartup, or WSAStartup failed”
I have just installed Windows 10, Visual Studio Community 2015, and Git for Windows . 我刚刚安装了Windows 10,Visual Studio Community 2015和Windows版Git 。 I also installed the latest Bitbucket and GitHub extensions. 我还安装了最新的Bitbucket和GitHub扩展。
Within Visual Studio I cloned my Bitbucket.com-hosted repository, and performed these operations successfully: 在Visual Studio中,我克隆了由Bitbucket.com托管的存储库,并成功执行了以下操作:
$ git --version
git version 2.19.2.windows.1
$ git pull
Already up to date.
But then when I tried to pull from another repository I got this error: 但是,当我尝试从另一个存储库中提取时,出现此错误:
$ 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. )
I am able to ping github.com though. 我可以ping github.com。
How can I investigate and fix the problem? 我该如何调查并解决问题?
For those who can't edit the URL, downgrading git to the previous version appears to work. 对于那些无法编辑URL的用户,将git降级到以前的版本似乎可行。
This seems to be an issue with git version 2.19.2.windows.1
这似乎是git版本2.19.2.windows.1
的问题
A low-tech workaround is to replace git://
with https://
in the URL. 一种技术含量较低的解决方法是将URL中的git://
替换为https://
。
The command then goes smoothly. 然后,命令运行顺利。
Warnings: 警告:
It is a known bug in earlier versions of Git for Windows. 这是Windows早期版本的Git中的一个已知错误。
Upgrade/Install version greater than 2.20.0.
升级/安装版本大于2.20.0.
You can check currently installed version with command $ git --version
您可以使用命令$ git --version
检查当前安装的版本
I found out there is one more solution, which is to navigate to the .git
folder, changing the 我发现还有另一种解决方案,即导航到.git
文件夹,更改
[remote "origin"]
url = git://github.com/yourUsername/yourRepo.git
to 至
[remote "origin"]
url = https://github.com/yourUsername/yourRepo.git
fixes the problem if one does not want to downgrade the git client 如果不想降级git客户端,则解决此问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.