如何修复"致命:无法查找https(端口9418)(不知道这样的主机)



我正在尝试使用以下git进行推送:

git push -u origin --all

这是我的问题:

Fatal: unable to look up https (port 9418) (No such host is known. )

我跑ping github.com并得到了IP,但我不知道如何处理它们。

您有一个错误的远程 URL - git:// 是 Git 协议的名称(端口 9418(,它不需要后跟不同的协议名称。

试试这个:

git remote set-url origin https://anhbui2904@bitbucket.org/anhbui2904/sample_app.git

这会将您的origin远程 URL 设置为使用 HTTPS。

如果git remote set-url origin不起作用,您可以直接编辑

.git/config

文件,并将git://https://前缀修复为所需的、git://或https://

最新更新