Search code examples
gitgithubgitlabrepositorycommit

unable to access Could not resolve host


I was developing code on Ubuntu using VMware. Everything was fine, I was coding and committing it to my Github account without any problem. BUT suddenly it stopped working, it would say: fatal: unable to access 'https://github.com/hm0ss/nst.git/': Could not resolve host: github.com

What Have I done? I searched it on google and used config command and other advice, with no avail. I also made another git repository, but that failed either. I switched to GitLab and made a repository there, which had no benefit: "Unable to access 'https://gitlab.com/hma.globe/nst2.git/': Could not resolve host: gitlab.com" I need to say that I was using a proxy (socks indeed) but even disconnecting socks server (or removing proxies from google chrome) did not work either. By the way, I even switched to windows and tried to commit but came across to same error. After trying some 2 hours, I'm now in big trouble.


Solution

  • Check first if the issue persists.

    GitHub status has been reporting several issues recently (in the last few hours) which could explain "sudden" problems of yours.

    For example: this incident: "We are investigating degradations to GitHub.com".

    GitLab had no recent issues though, which means a network issue on your side could also be a factor.

    The OP did a reset of the VMware to solve the network issue.
    And a full reset to origin/master + copy of the current work to lake and push a new commit successfully to GitHub.