Git在'上失败;libcurl'中不支持或禁用协议https;

Git在'上失败;libcurl'中不支持或禁用协议https;,git,macos,curl,https,macports,Git,Macos,Curl,Https,Macports,当我运行git push时,我收到以下错误消息: fatal: unable to access 'https://github.com/xxxx/yyyy.git/': Protocol https not supported or disabled in libcurl curl--version在支持的协议中显示https,并且哪个curl返回/usr/bin/curl。但我看到其他一些论坛帖子建议使用brew/macports手动安装curl,所以我尝试通过macports,使用+ss

当我运行git push时,我收到以下错误消息:

fatal: unable to access 'https://github.com/xxxx/yyyy.git/': Protocol https not supported or disabled in libcurl
curl--version
在支持的协议中显示https,并且
哪个curl
返回
/usr/bin/curl
。但我看到其他一些论坛帖子建议使用brew/macports手动安装curl,所以我尝试通过macports,使用+ssl。现在
curl--version
显示:

$ curl -h
dyld: Library not loaded: /opt/local/lib/libcurl.4.dylib
  Referenced from: /opt/local/bin/curl
  Reason: Incompatible library version: curl requires version 9.0.0 or later, but libcurl.4.dylib provides version 7.0.0
Abort trap: 6
哪个curl
返回
/opt/local/bin/curl

我决定这可能是一个升级到OSX Sierra的好时机,看看新的安装是否可以解决问题,但没有效果。这还包括对我的所有MacPorts进行彻底清理+重新安装+重建,但没有任何效果。我还尝试重新安装Git


什么坏了,我该如何修复它?

git使用了curl的内部副本libcurl,我认为它可能使用相同的配置,也可能不使用相同的配置。请将
GIT\u CURL\u VERBOSE
环境变量设置为
1
,然后重试?另外,您使用的是哪个版本的git?运行
(/opt/local/bin/)curl-h
时的崩溃很可能是由于环境中的
DYLD.*
变量造成的。使用
(set | grep DYLD)
进行检查,使用
/usr/bin/env
/usr/bin/printenv
将不会显示它们。这可能会,也可能不会导致Git无法使用TLS的问题。@neverpanic:就是这样。显然几个月前,我在DYLD_*path中添加了一些东西,以使一些(混乱的)研究人员的代码正常工作。删除导出后,它终于可以工作了。非常感谢。