So basically I have a server where I have bitbucket git repository set up. I\'ve been using it for months and now out of the blue sky when I try to pull I get the following erro
Restarting my system actually worked for me after
In my case it happened because connection was behind proxi.
From command line sites were inaccessible(no ping). However via browsers bitbucket.org was available.
The solution was:
git config --global http.proxy http://proxi_ip_or_host:80
As for me, I was getting this problem because the proxy settings on my machine. The minute I disabled the settings, it started to work.
Add following entry in host (including port number 22) on Windows OS
104.192.143.1:22 bitbucket.org
host file is located at C:\Windows\System32\drivers\etc
I canceled in the middle of git push
and then this started appearing. Doing a git pull && git fetch
made it work again.
Guess what... using Visual Studio and Git Gui I got this same message from git: Could not resolve host: bitbucket.org
.
Then I went to bitbucket using Chrome on Mac OS and bitbucket was accessible.
In my case it was the Parallels Windows virtual machine that had no internet connection! :-)
So check your internet connection before anything. It can be a simple "no internet connection" problem.