remote-https is not a git command when cloning repo

半腔热情 提交于 2019-12-23 19:59:02

问题


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.

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.

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.

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.


回答1:


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.

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.

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.



来源:https://stackoverflow.com/questions/51099023/remote-https-is-not-a-git-command-when-cloning-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!