Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
npm doesn't work through https_proxy #2050
Comments
nelsonpecora
commented
Jan 17, 2012
|
I'm also having problems with npm over a proxy. |
codereflection
commented
Jan 27, 2012
|
Also having this issue. I have https_proxy set in the environment, and tried https-proxy in npm config.. just get the error message from above. |
codereflection
commented
Jan 28, 2012
|
It seems that the work around right now is to redirect to the non-ssl url: npm config set registry=http://registry.npmjs.org/ |
tobr
commented
Mar 29, 2012
|
Same issuse for me. The work around works fine. |
jitheshm
commented
Apr 24, 2012
|
I was able to set my company's proxy and npm install worked npm config set proxy http://proxy_host:port |
codereflection
commented
Apr 24, 2012
|
What version of NPM are you running? On Tue, Apr 24, 2012 at 11:55 AM, jitheshm <
|
jitheshm
commented
Apr 24, 2012
|
I am running 1.1.16 |
abepetrillo
commented
Jun 6, 2012
|
Work around works for me, thanks @codereflection |
MisterY
commented
Sep 27, 2012
|
I just got this issue on CentOs 5. Thanks for the workaround! |
gramakri
commented
Oct 26, 2012
|
Same problem here. Workaround works for me. Using 1.1.62 |
eddie-dunn
commented
Feb 21, 2013
|
I get it as well. The workaround works, but is not secure as far as I can tell. |
|
I believe this works now but we can reopen if not. |
luk-
closed this
Mar 13, 2013
shengmx
commented
Apr 3, 2013
|
same the problem Using " Command Line Flags" |
maxbane
commented
May 20, 2013
|
The workaround fails, though, if you're trying to install a package that has to be fetched from https://github.com instead of the registry. |
EricFortin
commented
Jun 4, 2013
|
Exactly. I am able to clone repository from github over https but I can't install a package through npm. Even more so if the package I want to install is a dependency of another package. |
bowsersenior
commented
Jun 7, 2013
|
Got the same problem on Windows 7 with npm 1.2.25 but the workround does not work. I am on a corporate proxy w/ VPN. Not sure if this issue is related to #2472 ... |
tooxie
commented
Jan 8, 2014
|
@luk- this is still not working.
Could you please reopen this ticket? Thanks. |
mdurden
commented
Sep 8, 2014
|
Bump |
atuljangra
commented
Feb 16, 2015
|
Thanks for the workaround @codereflection. |
|
@atuljangra I'd have to look at the release notes, but more recent versions of npm (most definitely including the versions of npm bundled with Node.js 0.12.0 and io.js 1.1.0+) take advantage of request's support for the |
atuljangra
commented
Feb 19, 2015
|
@othiym23 that could be it. I'm on Ubuntu 14.04 and I've nodejs: 0.10.25 and npm: 1.3.10. |
zarvedan
commented
Jun 3, 2015
|
The work around from @codereflection worked for me ! Thanks ! |
postelrich
commented
Aug 28, 2015
|
Bumping this issue. Like its been said, setting registry to http works but not when it goes to github or bitbucket for the package. There should be a switch --no-check-certificate like wget. |
hashar
commented
Oct 16, 2015
|
Seems npm 1.4.21 recognizes the environment variables:
When hitting HTTPS proxy - https_proxy=https://sslproxy/
+ https_proxy=http://sslproxy/
^ |
danelkhen
commented
Oct 19, 2015
|
|
othiym23
added
the
support
label
Oct 19, 2015
fieryvova
commented
Nov 22, 2016
•
|
Update: nevermind this comment. My issue is not related to the proxy configuration. This issue breaks our build environment.
Can it be reopened? |
chrisdew commentedJan 17, 2012
I'm trying to use npm to install packages on a machine which doesn't have full internet connectivity (we connect to it via a VPN).
For most (non-npm) usages, ssh proxying our office's squid port over ssh to localhost:3129 works fine.
(We use the command 'ssh -R 127.0.0.1:3129:squid_server_ip:3128 root@target_server_ip'.)
As I test, I am successfully able to wget https://www.google.com over this proxy.
The npm docs say it should work: (http://npmjs.org/doc/config.html)
I have pasted the console below.
Thanks,
Chris.
P.S. I have also tried export https_proxy=https://127.0.0.1:3129 and export HTTPS_PROXY=https://127.0.0.1:3129, but it doesn't help.