Git:致命的:「https」のリモートヘルパーが見つかりません



Git Fatal Unable Find Remote Helper Forhttps



Git:致命的:「https」のリモートヘルパーが見つかりません

再発

test1280 $ git clone https://github.com/go-chassis/go-chassis Cloning into 'go-chassis'... fatal: unable to find remote helper for 'https' test1280 $ echo $PATH /home/test1280/git/bin:/home/test1280/git/libexec/git-core:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/test1280/bin

git / binとgit / libexec / git-coreの両方がPATHにあることが知られています。

git-remote-https実行可能ファイルについては、git / libexec / git-coreを確認してください。




解決する

1)libcurlインストールパッケージをダウンロードします( https://curl.haxx.se/download.html)

2)libcurl開発キットをインストールします



test1280 $ ./configure --prefix=$HOME/libcurl checking whether to enable maintainer-specific portions of Makefiles... no checking whether make supports nested variables... yes checking whether to enable debug build options... no …… test1280 $ make && make install Making all in lib make[1]: Entering directory `/home/test1280/curl-7.64.0/lib' make all-am make[2]: Entering directory `/home/test1280/curl-7.64.0/lib' CC libcurl_la-file.lo ……

libcurlライブラリが正常にインストールされました。

3)gitを再コンパイルします

test1280 $ ./configure --prefix=$HOME/git --without-tcltk --with-curl=$HOME/libcurl configure: Setting lib to 'lib' (the default) configure: Will try -pthread then -lpthread to enable POSIX Threads. configure: CHECKS for site configuration checking for gcc... gcc ……

わかりました、まだ問題があります:



test1280 $ make make: curl-config: Command not found LINK git-http-fetch http.o: In function `fill_active_slots': /home/test1280/git-2.20.1/http.c:1346: undefined reference to `curl_easy_cleanup' ……

4)gitconfigureヘルプを確認してください

test1280 $ cd $HOME/git-2.20.1 test1280 $ ./configure --help `configure' configures git 2.20.1 to adapt to many kinds of systems. Usage: ./configure [OPTION]... [VAR=VALUE]... …… --with-curl support http(s):// transports (default is YES) ARG can be also prefix for curl library and headers --with-expat support git-push using http:// and https:// transports via WebDAV (default is YES) ARG can be also prefix for expat library and headers ……

–with-curlデフォルトでは、このオプションはYESですが、configureの実行時にlibcurlライブラリーがないと見なされます。

test1280 $ ./configure --prefix=$HOME/git --without-tcltk --with-curl | grep curl checking for curl_global_init in -lcurl... yes checking for curl-config... no

curl-configコマンドが見つかりませんでした。これは、libcurlをコンパイルせずにlibcurlライブラリをインストールしないようにconfigureによって考慮されました。

test1280 $ which curl /usr/bin/curl test1280 $ whicu curl-config -bash: whicu: command not found

5)独自のcurl-configをポイントします

$ PATHはcurl-configコマンドを見つけられませんが、libcurlパッケージを$ HOME / libcurlにインストールしたことを忘れないでください。

test1280 $ ll $HOME/libcurl/bin total 220 -rwxr-xr-x 1 test1280 test1280 213675 Mar 6 21:33 curl -rwxr-xr-x 1 test1280 test1280 5476 Mar 6 21:33 curl-config test1280 $ echo 'export PATH=$HOME/libcurl/bin:$PATH' >> ~/.bash_profile test1280 $ source ~/.bash_profile test1280 $ ./configure --prefix=$HOME/git --without-tcltk --with-curl=$HOME/libcurl | grep curl configure: Setting CURLDIR to /home/test1280/libcurl checking for curl_global_init in -lcurl... yes checking for curl-config... curl-config configure: Setting CURL_LDFLAGS to '-L/home/test1280/libcurl/lib -lcurl'

gitのconfigureにcurl-configコマンドと関連するヘッダーファイル、ライブラリファイルを見つけさせ、libcurlでコンパイルします

6)gitを再コンパイルします

test1280 $ ./configure --prefix=$HOME/git --without-tcltk --with-curl=$HOME/libcurl && make && make install configure: Setting lib to 'lib' (the default) configure: Will try -pthread then -lpthread to enable POSIX Threads. configure: CHECKS for site configuration checking for gcc... gcc checking for C compiler default output file name... a.out ……

7)正常な操作

test1280 $ which git-remote-https ~/git/libexec/git-core/git-remote-https test1280 $ git clone https://github.com/go-chassis/go-chassis Cloning into 'go-chassis'... remote: Enumerating objects: 85, done. remote: Counting objects: 100% (85/85), done. remote: Compressing objects: 100% (71/71), done.

git-coreディレクトリにgit-remote-https実行可能ファイルを追加し、git httpsフォームクローンをサポートします!


実際、3番目のステップは正しいですが、gitのconfigureもcurl-configコマンドを検出しますが、それを見つけることができないためです。

結果のmakefileは、libcurlコンパイルなしで指定され、git-remote-httpsを生成できません。


関連:

1.1。 https://blog.csdn.net/test1280/article/details/87868144

参照:

1.1。 https://blog.csdn.net/zhezhebie/article/details/78035979
二。 http://www.bubuko.com/infodetail-659524.html
3.3。 https://blog.csdn.net/fenggms/article/details/83051423
四。 https://stackoverflow.com/questions/8329485/unable-to-find-remote-helper-for-https-during-git-clone