简体   繁体   English

Git 无法使用 https 获取、拉取或克隆

[英]Git unable to fetch, pull or clone using https

I am having problems fetching, pulling and cloning from a git repository.我在从 git 存储库中获取、拉取和克隆时遇到问题。 I get the following error message我收到以下错误消息

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
fatal: unable to access 'https://name@domain.tld/scm/project/projectname.git/': error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol

Server is a self hosted BitBucket server and Client is Sourcetree 1.8.3.0.服务器是一个自托管的 BitBucket 服务器,客户端是 Sourcetree 1.8.3.0。 Git is 2.6.1, but getting the same error with 2.7.2 Git 是 2.6.1,但在 2.7.2 中得到相同的错误

Client Machine is Windows 10.客户端机器是 Windows 10。

The same configuration works on a Mac.相同的配置适用于 Mac。 Also with TortoiseGit instead of Sourcetree give the error.也用 TortoiseGit 而不是 Sourcetree 给出错误。 So I suspect that Win is causing the problem.所以我怀疑是 Win 导致了这个问题。

How can I find out, what the real issue is?我怎样才能找出真正的问题是什么? The error message is not very helpful.错误消息不是很有帮助。

Update:更新:

this is what I get, when I perform a git pull from the command line这就是我得到的,当我从命令行执行git pull 时

C:\0.GIT\project>set GIT_TRACE=1
C:\0.GIT\project>set GIT_CURL_VERBOSE=1

C:\0.GIT\project>git pull
08:48:43.730071 git.c:348               trace: built-in: git 'pull'
08:48:43.734740 run-command.c:343       trace: run_command: 'fetch' '--update-head-ok'
08:48:43.974726 git.c:348               trace: built-in: git 'fetch' '--update-head-ok'
08:48:43.988735 run-command.c:343       trace: run_command: 'git-remote-https' 'origin' 'https://ulrich@server.domain.tld/project.git'
* Couldn't find host server.domain.tld in the _netrc file; using defaults
* timeout on name lookup is not supported
*   Trying 81.xxx.xxx.xxx ...
* Connected to server.domain.tld (81.xxx.xxx.xxx) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
  CApath: none
* error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol
* Closing connection 0
fatal: unable to access 'https://ulrich@server.domain.tld/project.git/': error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol

This error message indicates that the server is not supporting state of the art TLS versions, but only SSLv2 or SSLv3.此错误消息表明服务器不支持最先进的 TLS 版本,而仅支持 SSLv2 或 SSLv3。

Git uses curl which uses OpenSSL which is RFC conform: https://tools.ietf.org/html/rfc7568 requires to not support SSLv3 (see https://www.openssl.org/news/changelog.html where weak ciphers were disabled by default). Git 使用使用符合 RFC 的 OpenSSL 的 curl: https : //tools.ietf.org/html/rfc7568要求不支持 SSLv3(请参阅https://www.openssl.org/news/changelog.html ,其中弱密码是默认禁用)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM