desktop: Could not resolve host: github.com
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
- GitHub Desktop:1.22
- Operating system: windows 10 64 bit
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
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 93 (10 by maintainers)
Check this out as well. it helped me.
Hi All, Issue is resolved now. This was happening because I was behind a corporate proxy. I used below commnad to resolve the issue
git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
Thanks
This method works for me! reboot> then establish connection to internet… then> #git config --global --unset http.proxy #git config --global --unset https.proxy then> #git clone https://(…).git
Tried the following git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080 and git config --global --unset http.proxy git config --global --unset https.proxy but none seems to work for me; could it be a possible internet strength isssue?
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:
Remove the origin to clear out the initialization by: git remote rm origin
Then try again the command lines: git remote add “your link to the repo”.git git push -u origin master
Hope this help somebody.
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 https://github.com/desktop/desktop/issues/1998, #2789
in my case it was a firewall rule (cmd not having internet permission), created by the company i work for
@JCDigital27 i have the same problem, whe i use the solution, but it not work? when i use curl -I https://github.com, it show the error. curl: (6) Could not resolve host: github.com; Unknown error
Thank @imsrgadich. it worked for me.
Make sure Wi-Fi is on.
git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080 its not worked for me
In case you get this error even on
curl -I https://github.com– it’s all about DNS. You can clear your DNS cache to resolve this issuelinux:
sudo systemd-resolve --flush-cachesmac:sudo killall -HUP mDNSResponderI solved this error by using below command
git config --global --unset http.proxy👍This helped buddy
git config --global --unset http.proxymake sure to quit and restart terminal.
Disconnect the VPN and Reconnect the VPN resolved the connection issue for me.
All the solutions you proposed did not work for me. Anything else to propose?
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:
chmod +x fix_dns.shExecute o script com:
sudo bash fix_dns.shEste script faz backup do arquivo
resolv.conforiginal, substitui temporariamente as configurações com servidores DNS públicos do Google (8.8.8.8 e 8.8.4.4) e exibe uma mensagem informativa. Lembre-se de que isso é uma solução temporária e não corrige o problema subjacente na configuração do seu ambiente.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.
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.
thank you i fixed my problem
Thanks
None of these solutions work on Ubuntu 20.04, if anyone finds a solution to these for that OS, then please post here
I have no idea why but restart helped me (?)
https://stackoverflow.com/questions/20370294/git-could-not-resolve-host-github-com-error-while-cloning-remote-repository-in Check this link!