N: How to set company proxy option when using n ?

Created on 14 Apr 2017  路  4Comments  路  Source: tj/n

Issue Template:

Describe issue including what OS you are using

I'm using Centos 6.3 VM under company proxy.
I want to set proxy option when using 'n'.
I'm using npm with proxy settings but I can't find out how to use n with proxy option.
Do you have any idea ?

Describe what version of N you have

2.1.7

Describe how you installed N

npm install -g n

Steps to reproduce issue _1.2.3_

  1. n latest
  2. Nothing has happen. (probably due to no proxy option)

Describe the results you received

  • prompt

Describe the results you expected

  • upgrade node to latest version

What version of npm you are using

4.5.0

Additional information you deem important (e.g. issue happens only occasionally):

  • Output of which n:
    /usr/local/bin/n
  • Output of node -v:
    v.7.6.0

(paste your output here)

Most helpful comment

sudo -E n latest
worked for me. -E option for sudo passes environment variables for current user

All 4 comments

+1 for this. Looking for correct usage of HTTP_PROXY, HTTPS_PROXY env variables.

I tried it successfully with setting the env-vars http_proxy and https_proxy.
If the proxy does not allow ssl tunneling then my PR #426 comes in handy.

Oh, you're right. I was able to use 'n' just like 'wget' or 'curl'. Thank you for tips :)
export HTTP_PROXY=http://your-proxy-url:port
export HTTPS_PROXY=http://your-proxy-url:port
and then
n latest or whatever.

sudo -E n latest
worked for me. -E option for sudo passes environment variables for current user

Was this page helpful?
0 / 5 - 0 ratings