Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set company proxy option when using n ? #430

Closed
daiando opened this issue Apr 14, 2017 · 5 comments
Closed

How to set company proxy option when using n ? #430

daiando opened this issue Apr 14, 2017 · 5 comments

Comments

@daiando
Copy link

daiando commented Apr 14, 2017

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)

@nineohnine
Copy link

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

@alqu
Copy link

alqu commented Apr 19, 2017

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.

@daiando
Copy link
Author

daiando commented Apr 20, 2017

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.

@daiando daiando closed this as completed Apr 20, 2017
@mmatalia
Copy link

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

@KuiWei004
Copy link

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

worked for me !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants