I am having an issue with calling the following command from cmd
for installing PhoneGap:
npm install -g phonegap
The following error is returned:
Failed to connect to github.com port 443: Timed out
There are a fair amount of questions regarding this topic and they all seem to provide the same answer - make sure the proxy settings for git
and nodejs
are configured. I set up the node
proxy settings like so:
npm config set proxy http://proxyname:8080
npm config set https-proxy http://proxyname:8080
And for git
:
git config --global http.proxy http://proxyname:8080
git config --global https.proxy http://proxyname:8080
Both git config --list
and npm config list
confirm that these proxy settings are in place.
I have also allowed the programs through the fire wall by going to Windows Firewall
-> Allow a program or feature through windows firewall
. Then I selected the node.exe
for Node.js
and for git
I selected git.exe
.
I still however have the issue whereby it is failing to connect to Github. Is there anything else I am missing or forgetting to setup? Both Node.js and Git were installed for the first time for this task.
In addition to the above settings, it's possible that you're getting this error if some of the downloaded libraries declare their dependencies using the git://
protocol instead of https://
. These dependencies then usually fail with the above error.
To fix this, you can run the following:
git config --global url."https://".insteadOf git://
This will add a configuration option to Git, asking Git to use https
whenever a URL uses the git://
protocol.
This setting fixed many proxy issues for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With