Git无法使用https

时间:2016-03-26 12:56:12

标签: git tortoisegit sourcetree

我在从git存储库中获取,提取和克隆时遇到问题。我收到以下错误消息

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是一个自托管的BitBucket服务器,Client是Sourcetree 1.8.3.0。 Git是2.6.1,但与2.7.2相同的错误

客户端计算机是Windows 10。

相同的配置适用于Mac。使用TortoiseGit而不是Sourcetree也会出错。所以我怀疑Win导致了这个问题。

我怎样才能知道,真正的问题是什么?错误消息不是很有帮助。

更新

当我从命令行执行 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

1 个答案:

答案 0 :(得分:1)

此错误消息表明服务器不支持最新的TLS版本,但仅支持SSLv2或SSLv3。

Git使用curl,它使用符合RFC的OpenSSL:https://tools.ietf.org/html/rfc7568要求不支持SSLv3(默认情况下,请参见https://www.openssl.org/news/changelog.html弱密码被禁用)。