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

gitbook install is not working when via proxy #33

Open
dorako321 opened this issue May 7, 2016 · 4 comments
Open

gitbook install is not working when via proxy #33

dorako321 opened this issue May 7, 2016 · 4 comments

Comments

@dorako321
Copy link

when i execute gitbook install, it does not start download.
i guess gitbook install does not use HTTP(S)_PROXY environment variable.

@rolfyone
Copy link

I tried setting the registry setting for npm, and it doesn't use that either by the looks...

@aldanor
Copy link

aldanor commented Jul 27, 2017

Same here. Seems to ignore both .npmrc settings for http(s)_proxy, and also HTTP(S)_PROXY environment variables.

@ashwinaggarwal
Copy link

Gitbook uses npmi, which requires npm-global, and npm-global further requires the currently installed npm on your machine.

To configure proxy to your locally installed npm, just do the following,

if your proxy requires a username and password

npm config set proxy http://<username>:<password>@<proxy-server-url>:<port> -g
npm config set https-proxy http://<username>:<password>@<proxy-server-url>:<port> -g

in case it doesn't

npm config set proxy http://<proxy-server-url>:<port> -g
npm config set https-proxy http://<proxy-server-url>:<port> -g

Once done, try to run gitbook init and it should work fine.

p.s. It worked for me.

@wgf4242
Copy link

wgf4242 commented Jul 5, 2019

I set proxy in local .npmrc file still not start download.
Set proxy in global npmrc file , anything cannot be downloaded. Proxy works fine in browser and local npm config, but work for npm global mode,

proxy=http://127.0.0.1:1080

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