简体   繁体   中英

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 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.

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.

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.

if git remote set-url origin doesn't work, you may edit directly the

.git/config

file, and repair the git://https:// prefix to desired, git:// or https://

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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