试图访问 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/