Git Clone 在 OS X Yosemite 上因 sslRead() 错误而失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30385939/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git Clone Fails with sslRead() error on OS X Yosemite
提问by pinkdevelops
I'm currently on OS X Yosemite 10.10.3, and trying to git clone an existing repo which works fine on Windows. I've tried a combo of installing git through homebrew with curl/openssl with no luck. When i run the git clone, i get the following ssl read error:
我目前在 OS X Yosemite 10.10.3 上,并尝试 git clone 一个在 Windows 上运行良好的现有存储库。我尝试过使用 curl/openssl 通过自制软件安装 git 的组合,但没有成功。当我运行 git clone 时,出现以下 ssl 读取错误:
GIT_CURL_VERBOSE=1 git clone http://myURL/gitlab/project/project.git
> remote: Counting objects: 1641, done. remote: Compressing objects:
> 100% (1588/1588), done.
> * SSLRead() return error -98061641), 136.73 MiB | 1.71 MiB/s
> * Closing connection 2 remote: Total 1641 (delta 910), reused 0 (delta 0) error: RPC failed; result=56, HTTP code = 200 Receiving objects:
> 100% (1641/1641), 137.48 MiB | 1.64 MiB/s, done. Resolving deltas:
> 100% (910/910), done.
I've tried using both the Https & Http with no luck. Has anyone else hit something similar to this?
我试过同时使用 Https 和 Http 但没有成功。有没有其他人打过类似的东西?
Below are outputs of git, curl, & openssl versions if that helps.
如果有帮助,下面是 git、curl 和 openssl 版本的输出。
curl --version
curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz
git --version
git version 2.4.1
openssl version
OpenSSL 0.9.8zd 8 Jan 2015
Thanks in advance for any direction!
提前感谢任何方向!
回答by pinkdevelops
Javabrett's link got me to the answer, it revolves around Yosemite using an incorrect SSL dependency, which Git ends up using.
Javabrett 的链接让我找到了答案,它围绕 Yosemite 使用不正确的 SSL 依赖项,Git 最终使用了该依赖项。
Installing Git via homebrew with these flags works:
使用这些标志通过自制软件安装 Git 工作:
brew install git --with-brewed-curl --with-brewed-openssl
Or:
或者:
brew reinstall git --with-brewed-curl --with-brewed-openssl
回答by lmen6e
if one had no brewed openssl before the answer above(brew reinstall git --with-brewed-curl --with-brewed-openssl
) does not work.
如果在上面的答案( brew reinstall git --with-brewed-curl --with-brewed-openssl
)不起作用之前没有酿造过 openssl 。
The workflow described heredoes better:
这里描述的工作流程做得更好:
$ brew remove git
$ brew remove curl
$ brew install openssl
$ brew install --with-openssl curl
$ brew install --with-brewed-curl --with-brewed-openssl git
回答by Loyal Fine
If your are using a Virtul machine, then it is a connection problem. To solve this issue, you have to go to VM settings to Bridge the physical connection.
如果您使用的是虚拟机,则是连接问题。要解决此问题,您必须转到虚拟机设置以桥接物理连接。
VMware Player-->Removable Devices-->Network Adapter-->settings
VMware Player-->可移动设备-->网络适配器-->设置
You will find Network connection and check both
您会找到网络连接并检查两者
Bridged: Connected directly to the physical network
桥接:直接连接到物理网络
Replicate physical network connection state(if you are using a laptop).
复制物理网络连接状态(如果您使用的是笔记本电脑)。
Check following link for detail:
详情请查看以下链接:
回答by nagoor kani
Just installing git with "brew install git --with-brewed-curl --with-brewed-openssl" didn't help.
只是用“brew install git --with-brewed-curl --with-brewed-openssl”安装git没有帮助。
I got resolved by setting 2 remote URL with any protocol https:// or ssh://.
我通过使用任何协议 https:// 或 ssh:// 设置 2 个远程 URL 得到了解决。
- upstream for team repo
- origin for fork repo
- 上游团队回购
- fork repo 的起源
Now, I am able to push with my changes to origin without any problem.
现在,我可以毫无问题地推动对原点的更改。
Hope it helps!
希望能帮助到你!