If you are behind a proxy, you have to tell git about it:

git config --global http.proxy <http://my.proxy.com>:portnumber

If you are no more behind a proxy:

git config --global --unset http.proxy