'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 -
Could anyone please let me know where the mistake would have happened.
Solution 1:[1]
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.
Solution 2:[2]
How I fixed it (first-time user of git):
most likely, I made a typo in the url when adding the remote (git remote add name url);
to fix it, I made a brand new remote, this time careful not to make any typos. Also created a brand new repository on github. Works fine now.
To eliminate clutter, I deleted the faulty remote (git remote remove name) but this had an effect only on my pc. github.com won't allow you to delete the botched repository. It wants to shame you for eternity, but who cares.
E. Thomson's reply above I found too wordy as a first-time user. Was worried I have to go into git's basic configuration or something. But the third and last paragraphs were helpful.
Solution 3:[3]
I was getting the same error
$ git push -f origin master
git: 'remote-ttps' is not a git command. See 'git --help'.
The most similar command is
remote-https
here is how i resolved it
remove the current origin
$ git remote remove origin
add origin again now check for spelling mistakes
$ git remote add origin YourURLHere
and now push
$ git push -u origin master
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Edward Thomson |
Solution 2 | Ovidiu Oprea |
Solution 3 | Sumedh Deshpande |