Fatal Error : Can't resolve host github.com

孤街浪徒 提交于 2019-12-05 13:32:30

问题


I am trying to push files to my remote repository from my local repository and I see this

fatal error : fatal: unable to access 'https://github.com/vinivasundharan/abcd.git/': Couldn't resolve host 'github.com'

My computer is not using any Proxy because I have seen methods to resolve the issue when Proxy is being used.

I have tried the solutions from this and this. But both doesn't seem to help. My system has an active internet connection using Windows 7.

UPDATE

git config -l returns the following. I had to post it because I do not what exaclty this means

core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Users/vav9sw/AppData/Local/Programs/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=xyz
user.email=xyz@gmail.com
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
remote.origin.url=https://github.com/vinivasundharan/abcd.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*`

EDIT

Just to make sure that i have followed the steps to Upload the file to GitHub check the attached image to see the steps i have followed.


回答1:


This solved my problem:

http version:

git config --global --unset http.proxy

https version:

git config --global --unset https.proxy



回答2:


In Windows, if you've any third party firewall (or internet activity monitor) installed, then configure them to allow your client to access outside connection.

If there aren't any 3rd part firewallls, then go to control panel, search for firewall. Inside the firewall panel, select Add a new exception (or similar option). Allow the git client both inbound and outbound access.




回答3:


I recomend you to switch to ssh.

You can get github ssh link from same place where https one. Then you just have to generate/add your ssh key to github profile. And that's it.



来源:https://stackoverflow.com/questions/33667782/fatal-error-cant-resolve-host-github-com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!