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

Whenever I attempt to clone, push or pull I get:

C:\Users\User\Documents\Project>git pull 

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

Committing and adding still work fine.

6

8 Answers

In my case, I was building Git from source in WSL Ubuntu.

The distribution didn't come with libcurl preinstalled. In this case, the git-remote-http executable was not being built. So I installed it:

sudo apt install libcurl4-openssl-dev 

Then, I re-configured, re-maked and re-installed, and Git could clone.

5

I was also having this error, and solved it by running this command:

path %path%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin

This added the folder where my git-remote-https.exe file was stored.

I was using Entware and had installed git using opkg install git and was getting this error. Installing git-http fixed it for me, i.e. opkg install git-http. This also helps on OpenWrt based systems.

Today, I was facing the same problem. The problem in my case was wrong path set in android studio to the git execution file. I changed the path of git execution and it worked. According to my git installation the path was C:\Program Files\Git\mingw64\bin\git.exe. I used this path in android studio. By using below steps

  1. File
  2. Setting
  3. version control
  4. git And I pasted the above mentioned path in Path to git exectable

and done.

Hope this helps other.

I had the same error and I solved by installing the latest version of Git for Windows at . This might not be the correct solution for everyone. I had recently uninstalled Git for Windows not realizing that my git GUI, SourceTree, was using it.

I encountered the same thing with the git 2.18.0 or higher version. I downgraded to 2.17.* and it seems to solve the problem. My issue was running git clone through https.

1

Check the URL from .git/config file.

In my case, the error was the remote origin location

[remote "origin"] url = "CHECK THIS LOCATION" 

I guess the remote location is something like this and the unknown git command 'remote-https' came from an invalid combination of 'remote' + 'https'

[remote "origin"] url = 

Note:

  • If after build and install git from the latest source code, this issue is occurred, continue..
  • If not, just ignore this answer..

Check the command git-remote-https existed or not in your git install path. For me, after build from source and make install, I can check that by

=---------------------= │git on  HEAD (cd3e6062) -> ls /usr/local/bin/git* 

If that command not existed in path, copy the git-remote-https built from your git source code path to your git install path,

=---------------------= │git on  HEAD (cd3e6062) -> sudo cp git-remote-https /usr/local/bin 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like