Search code examples
gitwindows-10

git: 'remote-ttps' is not a git command


I am getting an error when I try to push my changes to remote branch, the complete error that I get is shown below -

$ git push origin master
git: 'remote-ttps' is not a git command. See 'git --help'.

The most similar command is
       remote-https

I don't remember what changes I did to the commands, but it looks misspelled.

I have also tried to look for this command available in git installation folder and its there as expected, here is the screenshot of it -

enter image description here

Could anyone please let me know where the mistake would have happened.


Solution

  • This unfortunate error message is an illustration of Git's modularity: when it wants to connect to a remote server, it will invoke a helper command, named git-remote-<protocol>. So you'll often see the HTTP-based transfer mechanism invoking git-remote-https.

    You could even add your own remote transfer mechanism. I could create an executable named git-remote-ethomson and put it in my path. I could then invoke it by running git clone ethomson://my/repo.git. Git will parse that URL, note the scheme ethomson and go looking for a suitable remote helper in git-remote-ethomson.

    It looks like what happened here is that you've mistyped a URL, and your remote's URL is ttps://github.com/org/repo.git. (Note that this is ttps, not https.)

    As a result of this configuration, git is looking for an executable to service that remote URL, as git-remote-ttps. Since that helper program doesn't exist, it's failing.

    If you correct the configuration from ttps://... to https://..., then things should start working correctly.