git-remote-<protocol>
的帮助命令。所以你经常会看到基于 HTTP 的传输机制调用 git-remote-https
。git-remote-ethomson
的可执行文件并将其放在路径中。然后我可以通过运行 git clone ethomson://my/repo.git
来调用它。Git 将解析该 URL,注意到方案为 ethomson
并在 git-remote-ethomson
中寻找合适的远程帮助程序。ttps://github.com/org/repo.git
。(请注意,这是 ttps
而不是 https
。)git-remote-ttps
。由于该辅助程序不存在,因此失败了。ttps://...
更正为 https://...
,那么应该会开始正确工作。我遇到了同样的错误。
$ git push -f origin master
git: 'remote-ttps' is not a git command. See 'git --help'.
The most similar command is
remote-https
$ git remote remove origin
现在再次添加源,检查拼写错误
$ git remote add origin YourURLHere
$ git push -u origin master
git config --list --show-origin
的输出内容?您可能在某个地方遗漏了一个https
URL 的前导h
。 - Edward Thomsongit remote -v
显示什么内容?远程名称是否可能被错误地添加了前缀tpps://
而不是https://
? - joanis