简体   繁体   English

如何修复“fatal :unable to look up https (port 9418) (No such host is known)”

[英]How to fix "fatal :unable to look up https (port 9418) (No such host is known)

I am trying to push using git using:我正在尝试使用 git 推送:

git push -u origin --all

Here is my problem:这是我的问题:

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

I ran ping github.com and got the IP, but I do not know what to do with them.我跑了ping github.com并获得了 IP,但我不知道如何处理它们。

You have a wrong remote URL - git:// is the name of Git protocol (port 9418), and it doesn't need to be followed by a different protocol name.你有一个错误的远程 URL - git://是 Git 协议的名称(端口 9418),它不需要跟随不同的协议名称。

Try this:尝试这个:

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

This will set your origin remote URL to use HTTPS.这会将您的origin远程 URL 设置为使用 HTTPS。

if git remote set-url origin doesn't work, you may edit directly the如果git remote set-url origin不起作用,您可以直接编辑

.git/config .git/配置

file, and repair the git://https:// prefix to desired, git:// or https://文件,并将git://https://前缀修复为所需的 git:// 或https://

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM