If none of solutions given above works,also check your permissions and firewall settings. In my case adding proxy environment variables did the job.
For Linux or mac
$ export HTTP_PROXY=http://:
$ export HTTPS_PROXY=http://:
For Windows
set HTTP_PROXY=http://:
set HTTPS_PROXY=http://: