gnutls_handshake()が失敗しました:プル関数のエラー

git submodule update --init --recursiveを実行して、プロジェクトサブモジュールをgithubからプルすると、次のエラーが表示されます。

さまざまな解決策を試しても解決しませんでした。

1.プロキシを構成します(無効にしてみてください)

设置代理
git config --global http.https://github.com.proxy http://127.0.0.1:7890
git config --global https.https://github.com.proxy https://127.0.0.1:7890
#7890为代理端口

取消代理配置
git config --global --unset http.proxy
git config --global --unset https.proxy

查看代理配置
git config --global http.proxy
git config --global https.proxy

查看全部配置
git config --global -l

2. opensslをインストールします(無効にしようとします)

問題の原因を突き止めてください、それはgnutlsパッケージです。代理店の裏側は変だ。ただしopenssl、弱いネットワークでも機能します。したがって、解決策は、opensslコンパイルを使用する必要があるということですgitこれを行うには、次のコマンドを実行します。

sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
dpkg-source -x git_1.7.9.5-1.dsc
cd git-1.7.9.5

1.7.9.5システム内の実際のgitバージョンに置き換えることを忘れないでください。)

次に、debian/controlファイルを編集し(コマンドを実行gksu gedit debian/control:)、すべてのlibcurl4-gnutls-devインスタンスをlibcurl4-openssl-dev。に置き換えます

次に、パッケージをビルドします(テストが失敗した場合は、ファイルからdebian/rules削除できますTEST=test)。

sudo apt-get install libcurl4-openssl-dev
sudo dpkg-buildpackage -rfakeroot -b

新しいパッケージをインストールします。

i386:sudo dpkg -i ../git_1.7.9.5-1_i386.deb

x86_64:sudo dpkg -i ../git_1.7.9.5-1_amd64.deb

3. gitを最新バージョンにアップグレードします(役に立たないようにしようとします)

4. gitにSSL証明書エラー(無効な試行)を無視させます

git config --global http.sslVerify false

5.gitアドレスhttpsをgitプロトコルに変更します

vi .gitmodules 

URLアドレスhttpsをgitに変更します

例:https//github.com/mfontanini/cppkafka.git

git ://github.com/mfontanini/cppkafka.gitに変更ます

次に、git submodule syncを実行して、構成を同期します

git config-lビュー構成は問題ありません

git submodule update --init --recursiveを実行して、正常にプルします

おすすめ

転載: blog.csdn.net/u014608280/article/details/115002494