ubuntu使用Git fatal: Unable to find remote helper for 'https'

错误如下:


image.png

root@ubuntu-docker:/server# git clone https://github.com/zhaojunlike/nodejs-spider-shangbiao2.git
正克隆到 'nodejs-spider-shangbiao2'...
fatal: Unable to find remote helper for 'https'

我本地的ubuntu虚拟机,尝试克隆的时候报错,我翻阅了一下google的答案,下面是其中一个可行的方案总结。

#apt remove git
#apt install git-core

我们在/usr/lib/git-core可以发现一堆git可执行文件,我们需要让 git-remote-https可用,我需要把这个路径加入到我们的PATH

image.png
#vim /etc/profile
或者
#echo "export PATH=/usr/lib/git-core:\$PATH">>/etc/profile
让环境变量生效
#source /etc/profile
image.png

在修改好path以后,git已经可以克隆

image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容