-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not resolve host: github.com #4872
Comments
Hey @shiv1490. This error message seems to indicate a connectivity problem. Do you currently have any antivirus software installed other than the default antivirus that ships with Windows? Additionally, are you using a proxy server to access the internet? Git requires special configuration to work behind proxy servers, see #1998, #2789 |
Hi All, git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080 Thanks |
@shiv1490 👍 |
Check this out as well. it helped me.
|
in my case it was a firewall rule (cmd not having internet permission), created by the company i work for |
Tried the following |
I too tried the same. It does not work for me as well and i do not think it is related to internet strength. Not sure why. |
This method works for me! |
Why does this fix work? |
@davidbeery The |
@JCDigital27 i have the same problem, whe i use the solution, but it not work? |
|
Please i need a help $url="https://api.sellercenter.net/?Action=GetProducts&UserID=***&Signature=***&Format=JSON";
the result is 👍 |
@sadkisoft this issue tracker is for GitHub Desktop -- if you have specific programming questions I'd recommend our Community Forum or StackOverflow. |
This helped buddy |
git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080 |
Thank @imsrgadich. it worked for me. |
Hi everybody! I had the same problem and I solved differently. First, I was getting the error, because I created the Local repo and initialized before I had an online instance of the repo. Then manually, online in my git hub account created the repo to push my local files on it. When I tried to push the local repo into the online I got the error. Solution:
Hope this help somebody. |
Did it work for Ubuntu |
@Harshada-github the proxy configuration command will work for Ubuntu. |
All the solutions you proposed did not work for me. Anything else to propose? |
@emmanuellekamwa are you encountering the |
@steveward Yes I have that error and I am behind a firewall |
@emmanuellekamwa you may need to reach out to someone who can assist with allowing GitHub Desktop access through your firewall. Unfortunately there isn't much we can do on our end about this error. Are you running any specific antivirus software? Is this a corporate machine? |
It worked for me when I used "service apache2 stop" ;-) |
Please anyone can help me out? I've tried all the solutions here non of them worked😢 |
1 similar comment
@DTechBloKe if you can upload your log file in a comment on this issue that should give some more information about the error you are experiencing. |
worked for me |
not worked for me |
Check again. This worked for me git config --global --unset http.proxy |
Tried everything here and it failed. This helped me. |
simply try reconnecting to your wifi, |
Thanks, this worked well on my M2 |
How can i solve this fatal: unable to access 'https://github.com/ultrasecurity/Storm-Breaker.git/': Could not resolve host: github.com |
None of the solutions worked for me. Finally re-connecting my wifi did the trick. |
It shows me this error because I ran out of internet at home for a few hours. but I thought that SD was completely offline and now I realize that if there is no internet it does not work. Is there a way to fix this in case some other day you were without internet? |
|
this worked for me |
thanks this worked for me |
None of this worked for me can anyone help me 🥲 i am using kali linux on phone |
#git config --global --unset http.proxy Upon commands helped me, you can try also |
I encountered this same issue today for the first time and immediately noticed it had to do with my internet connectivity. I realized my internet router went off, which was the reason for the error. As soon as I went back online, the push command worked. |
in my case its because windows defender public firewall. i use wsl2 ubuntu 20 distro, usually i can push and fetch, but after some changes in host windows, wsl2 cant push and fetch. The ping github.com also fail. after some searching for issue, i try disable windows defender public firewall, and then try to do git commands and it works again. |
Se você está enfrentando problemas de resolução de host no Kali Linux e precisa resolver o problema temporariamente, pode criar um script que ajuste as configurações do arquivo /etc/resolv.conf. Certifique-se de entender que esta é uma solução temporária, e você deve procurar corrigir o problema subjacente com as configurações de rede ou DNS em seu ambiente. Aqui está um exemplo de um script simples que você pode criar: Crie um script chamado, por exemplo, fix_dns.sh:
Certifique-se de tornar o script executável com o comando:
Execute o script com:
Este script faz backup do arquivo |
The error message you're seeing,
ping -c 4 google.com
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
To anyone who is using git CMD over socks5 proxy: if your computer failed to access github.com by git or curl command like next: C:\Users\admin>ping github.com
Ping request could not find host github.com. Please check the name and try again.
C:\Users\admin>curl -v github.com
* Rebuilt URL to: github.com/
* Could not resolve host: github.com
* Closing connection 0
curl: (6) Could not resolve host: github.com
C:\Users\admin>curl -v github.com --proxy socks5://192.168.29.1:1080
* Rebuilt URL to: github.com/
* Trying 192.168.29.1...
* TCP_NODELAY set
* SOCKS5 communication to github.com:80
* Could not resolve host: github.com
* Closing connection 0
curl: (6) Could not resolve host: github.com and if you can get 301 redirect over a socks5 proxy: # `20.205.243.166` is the IP of github.com, you can found it at https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-githubs-ip-addresses
# `192.168.29.1:1080` is your socks5 proxy
C:\Users\admin>curl -v 20.205.243.166 --proxy socks5://192.168.29.1:1080
* Rebuilt URL to: 20.205.243.166/
* Trying 192.168.29.1...
* TCP_NODELAY set
* SOCKS5 communication to 20.205.243.166:80
* SOCKS5 connect to IPv4 20.205.243.166 (locally resolved)
* SOCKS5 request granted.
* Connected to 192.168.29.1 (192.168.29.1) port 1080 (#0)
> GET / HTTP/1.1
> Host: 20.205.243.166
> User-Agent: curl/7.55.1
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Content-Length: 0
< Location: https://20.205.243.166/
<
* Connection #0 to host 192.168.29.1 left intact it means that your computer failed to resolve DNS but your proxy socks5 works and you can use git over this proxy when configured properly. using git config --global http.proxy http://192.168.29.1:8088 # use http proxy
git config --global https.proxy socks5h://192.168.29.1:1080 # or use socks5 proxy
git clone https://github.com/abhinavsingh/proxy.py |
Description
I create a new repository in my local and complete the changes . After that I opened my github desktop to push the changes to my GitHub repo. As soon as i click the publish button it gave me this error
Version
Steps to Reproduce
Expected Behavior
Should publish new repository
Actual Behavior
gave this error - fatal: unable to access 'https://github.com/shiv1490/Burger-Builder.git/': Could not resolve host: github.com
Additional Information
Logs
The text was updated successfully, but these errors were encountered: