克隆仓库时remote-https不是git命令 [英] remote-https is not a git command when cloning repo

查看:4828
本文介绍了克隆仓库时remote-https不是git命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows(版本10)计算机上,在撰写本文时,最新的git客户端(2.18.0.windows.1),使用HTTPS克隆存储库失败,并显示错误:

On a Windows (version 10) machine, with the latest git client at the time of writing (2.18.0.windows.1), cloning repositories using HTTPS fails with error:

git: 'remote-https' is not a git command.

经过一番研究,结果发现git附带了几个remote-<command>实用程序,其中remote-https是其中之一.因此,错误消息似乎告诉我们计算机上未安装"remote-https".

After a bit of research it turns out that git comes with several remote-<command> utilities, with remote-https being one of them. The error message therefore seems to tell us that `remote-https is not installed on the machine.

经过更多研究,似乎通过安装curl解决了其他开发人员的类似问题.我们正在处理的机器也安装了curl(7.46.0).

After a bit more research, it seems that similar problems for other developers were solved by installing curl. The machine we're dealing with does have curl (7.46.0) installed as well.

我们尝试完全从git-scm.comgitforwindows.org重新安装git客户端几次,都导致相同的错误.

We tried reinstalling the git client a couple of times entirely from git-scm.com as well as gitforwindows.org, both resulting in the same error.

任何帮助或解决此问题的指针都将受到高度赞赏.

Any help or pointer to get this fixed is highly appreciated.

推荐答案

我刚刚修复了构建环境中的错误.希望我的解决方案对您有用.
我的环境:Windows10 + Jenkins + git git版本2.18.

I just fixed the error in my build env. hope my solution is useful to you.
my env: Windows10+Jenkins+git git version 2.18.

我只是将git重新安装到Windows中,并在安装过程中进行了其他选择:"MINTTY".重新安装后,我在git安装目录下找到了remote-https.

I just reinstall the git into windows, with a different selection during the installation:"MINTTY". after reinstall, I found the remote-https under my git install directory.

此外,您需要设置詹金斯环境.确保配置了Jenkins env中包含的新git路径.如果您回显%Path%",并且可以找到包含远程https的新git路径,那么就可以了.

also, you need to set the jenkins env. make sure that the new git path which was included in the Jenkins env configure. if you "echo %Path%", and you can find the new git path which included the remote-https, then you are fine.

这篇关于克隆仓库时remote-https不是git命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆