macos - 错误 :1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

标签 macos openssl

我有一台运行 Osx Lion 10.7.5 的旧 Macbook,这是它支持的最高升级。
在运行 git clone 时,我收到此错误。

Veers-Macbook:~ Veer$ git clone https://github.com/heroku/python-getting-started.git
Cloning into 'python-getting-started'...
fatal: unable to access 'https://github.com/heroku/python-getting-started.git/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

基于其他类似问题,我的系统详细信息如下:
Veers-Macbook:~ Veer$ which git
/usr/local/git/bin/git

Veers-Macbook:~ Veer$ git --version
git version 2.3.5

Veers-Macbook:~ Veer$ git config http.sslVersion
tlsv1.2

我运行了这两个命令
    git config --global --unset http.sslVersion
    git config --global --add http.sslVersion tlsv1.2

为了验证我运行了配置文件
 Veers-Macbook:~ Veer$ git config --global --list
 user.name=Gurupratap Matharu
 user.email=gurupratap.matharu@gmail.com
 credential.helper=osxkeychain
 core.excludesfile=/Users/admin/.gitignore
 mergetool.sublime.cmd=subl -w $MERGED
 mergetool.sublime.trustexitcode=false
 merge.tool=sublime
 alias.gui=!sh -c '/usr/local/git/libexec/git-core/git-gui'
 http.sslversion=tlsv1.2

看起来配置文件有 http tlsv1.2 但错误仍然存​​在。

你能指导我如何解决这个问题。我唯一的目标是通过命令行使用 github。

最佳答案

这可能是由 Lion 上的旧加密引起的,互联网已宣布已弃用该加密(例如, https://githubengineering.com/crypto-removal-notice/ )

对于一种解决方案,您可以尝试tigerbrew https://github.com/mistydemeo/tigerbrew

对于不同的实验解决方案,我在这里制作了自己的非常简单的包:http://try.gitea.io/donbright/lm如果您已经安装了 Xcode + Xcode 命令行工具,它将在 Lion 机器上引导 curl 和 git。但是,您复杂的 git 配置可能无法使用它,您可能需要将配置清除干净。

关于macos - 错误 :1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51215966/

相关文章:

IOS 应用内购买收据 AppleInc 根 CA 验证

c++ - 我可以多次使用 BIO_puts、BIO_read 而无需重新连接吗?

c - 将 SSL 集成到使用 BSD 套接字的程序中

c# - 将 C openssl TripleDes 加密转换为 .NET

c# - 从 .net core 6.0 连接到在 Docker 中运行的 Sql Edge Server

c++ - Mac OS X 目标的体面交叉编译器

IOS Flutter 运行 - 未连接设备

cocoa - 重新启动/刷新 Dock - Killall Dock - 缓存

java - 以编程方式将 PEM 文件转换为 PKCS8

macos - 如何在 swiftui (macos) 中将文本字段添加到工具栏