xpt*_*xpt 3 git configuration windows-subsystem-for-linux
尝试git-bash使用 canonical访问准备好的 git repo git,我得到:
$ git pull
fatal: Unsupported SSL backend 'schannel'. Supported SSL backends:
gnutls
Run Code Online (Sandbox Code Playgroud)
在WSL 下使用 Git Bash之后,我完成了git config http.sslBackend openssl:
$ git config http.sslBackend
openssl
$ git config --global http.sslBackend
openssl
Run Code Online (Sandbox Code Playgroud)
按照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
Run Code Online (Sandbox Code Playgroud)
我还缺少什么?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Run Code Online (Sandbox Code Playgroud)
在 Windows WSL 中运行。
附注。经过上述所有调整,这个 git repogit-bash仍然可以pull正常工作,所以我猜它SSL backend 'schannel'是在这个 repo 的其他地方配置的。
聚苯乙烯。发现它与“ git-bashprepared 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
Run Code Online (Sandbox Code Playgroud)
Mar*_*ate 18
由于 @bk2204 提供的解决方案对我不起作用,我尝试将其手动更改为“gnutls”值并且它有效。
\n1-我尝试了@bk2204修复,但它对我不起作用。
\n\n\ngit config --unset-all http.sslBackend
\n
2-尝试将http.sslBackend设置为“openssl”
\n\n\ngit config --global http.sslBackend“openssl”
\n
没有
\n3-“如果 cmd 建议使用 gnutls,为什么不使用它呢?
\n\n\ngit config --global http.sslBackend "gnutls"\n它也不起作用
\n
4-手动更改!
\n\n\ncmd: vim ~/.gitconfig\n将 http sslBackend 的值替换为 gnutls
\n
达\xc3\xa1!
\n.gitconfig 结果
\n[http]\n sslBackend = gnutls\nRun Code Online (Sandbox Code Playgroud)\n
通常,该http.sslBackend选项仅在 Windows 上可用。大多数 Linux 发行版不提供它作为选项,因为它们不使用多个 TLS 库进行编译。
正确的解决方案是删除所有http.sslBackend选项:
$ git config --unset-all http.sslBackend
Run Code Online (Sandbox Code Playgroud)
如果出于某种原因必须使用 OpenSSL,则需要自己编译。大多数 Linux 发行版在法律上都被禁止在 GPLv2 下分发链接到 OpenSSL 的 Git,因此他们通常不会这样做。