簡體   English   中英

git pull因“應用程序未調用WSAStartup或WSAStartup失敗”而失敗

[英]git pull fails with “Either the application has not called WSAStartup, or WSAStartup failed”

我剛剛安裝了Windows 10,Visual Studio Community 2015和Windows版Git 我還安裝了最新的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。

我該如何調查並解決問題?

對於那些無法編輯URL的用戶,將git降級到以前的版本似乎可行。

這似乎是git版本2.19.2.windows.1的問題

一種技術含量較低的解決方法是將URL中的git://替換為https://
然后,命令運行順利。

警告:

  • 它僅以只讀方式工作,因此,如果您將來可能希望推送到存儲庫,請改用PhillyAI的解決方案
  • 請注意,盡管當前可與GitHub一起使用,但此技巧可能不適用於其他Git服務器。

這是Windows早期版本的Git中的一個已知錯誤。

升級/安裝版本大於2.20.0.

您可以使用命令$ git --version檢查當前安裝的版本

我發現還有另一種解決方案,即導航到.git文件夾,更改

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

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

如果不想降級git客戶端,則解決此問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM