git fatal error : Unsupported SSL backend 'schannel'

标签 git configuration windows-subsystem-for-linux

试图访问 git-bash使用规范准备 git repo git ,我得到:

$ git pull
fatal: Unsupported SSL backend 'schannel'. Supported SSL backends:
        gnutls
关注 Using Git Bash under WSL , 我做完了 git config http.sslBackend openssl :
$ git config http.sslBackend 
openssl

$ git config --global http.sslBackend
openssl
以下提示from reddit , 我弄完了:
sudo apt install -y gnutls-bin

# and here are my installed packages:
ii gnutls-bin  amd64 GNU TLS library - commandline utilities
ii libcurl3-gnutls:amd64  amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)
ii libgnutls-dane0:amd64  amd64 GNU TLS library - DANE security support
ii libgnutls30:amd64  amd64 GNU TLS library - main runtime library
我还缺少什么?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
在 Windows WSL 中运行。
PS .经过以上所有调整,git-bash还可以pull这个 git repo 很好,所以我猜 SSL backend 'schannel'在这个 repo 的其他地方配置。
PPS .发现它与“git-bash 准备好的git repo”无关,因为即使克隆一个新的也会给我完全相同的错误。
这是我的 git config --show-origin -l输出,让我知道是否需要包含更多内容:
$ git config --show-origin -l | grep -E 'ssl|http'
file:/home/me/.gitconfig        http.sslbackend=openssl
file:.git/config        http.sslverify=false
file:.git/config        http.sslbackend=openssl
file:.git/config        http.emptyauth=true
file:.git/config        remote.origin.url=http://xxx:8080/tfs/DefaultCollection/xxx
file:.git/config        lfs.http://xxx:8080/tfs/DefaultCollection/xxx/info/lfs.access=ntlm

最佳答案

一般来说,http.sslBackend选项仅在 Windows 上可用。大多数 Linux 发行版不提供它作为选项,因为它们不使用多个 TLS 库进行编译。
正确的解决方案是删除所有 http.sslBackend选项:

$ git config --unset-all http.sslBackend
如果出于某种原因必须使用 OpenSSL,则需要自己编译。大多数 Linux 发行版在法律上都被禁止在 GPLv2 下分发链接到 OpenSSL 的 Git,因此他们通常不会这样做。

关于git fatal error : Unsupported SSL backend 'schannel' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66862358/

相关文章:

iis - asp.net以斜杠结尾的无效路径不会返回错误页面IIS

Eclipse OSGI 配置 : relative paths and/or @config. 类似目录的替换?

docker - 如何修复 "Failed to connect to localhost port 9515: Connection refused"Laravel Dusk

reactjs - 在 Windows 10 的 WSL ubuntu 上设置 Cypress

python - GitPython 如何克隆所有分支?

git - 您如何在 Git for Puppet 中安全地存储 TLS/SSL key 文件?

Git:如何忘记很旧的提交

git - 停止 Teamcity 显示已删除的分支

windows - 为什么 Linux git 在 Windows WSL 中运行并在 NTFS 文件系统上运行时不创建适当的 Windows 符号链接(symbolic link)?

git - 致命 : Not possible to fast-forward, 中止