8

I'm working behind my institute proxy and can't use yarn, its showing

yarn install v1.16.0
info No lockfile found.
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...

npm install giving me this error

network tunneling socket could not be established, statusCode=503

Yarn version 1.16.0; node version 8.10.0; npm version 3.5.2; ubuntu 18.04.02

What I have done so far:

  1. set proxy in /etc/apt/apt.conf and /etc/environment

    Acquire::http::proxy "http://username:password@proxy:port";
    Acquire::https::proxy "http://username:password@proxy:port";
    Acquire::ftp::proxy "http://username:password@proxy:port";

  2. set proxy in .bashrc

    export http_proxy="http://username:password@proxy:port";
    export https_proxy="http://username:password@proxy:port";
    export HTTPS_PROXY="http://username:password@proxy:port"
    export HTTP_PROXY="http://username:password@proxy:port"

  3. yarn install --network-timeout 100000

  4. yarn config set proxy http://username:password@host:port
    yarn config set https-proxy http://username:password@host:port

  5. with npm

    npm config set registry http://registry.npmjs.org/
    npm config set proxy http://username:mypassword@proxy:port
    npm config set https-proxy http://username:mypassword@proxy:port
    npm config set strict-ssl false
    npm --proxy http://myusername:mypassword@proxy.us.somecompany:8080 --without-ssl --insecure -g install

  6. Did all of these mentioned here https://github.com/yarnpkg/yarn/issues/5259#issuecomment-379769451
  7. Did all these Is there a way to make npm install (the command) to work behind proxy?

None of them fixed the problem. How do I make yarn work in this case?

UPDATE:
I have tried :
$ wget https://registry.npmjs.org/requests/-/requests-0.2.2.tgz
--2019-06-07 14:15:45-- https://registry.npmjs.org/requests/-/requests-0.2.2.tgz
Resolving proxy.iacs.res.in (proxy.iacs.res.in)... 192.168.1.106, 192.168.1.237
Connecting to proxy.iacs.res.in (proxy.iacs.res.in)|192.168.1.106|:3128... connected.
Proxy tunneling failed: Service UnavailableUnable to establish SSL connection.

Eular
  • 1,707
  • 4
  • 26
  • 50
  • You have a http proxy, not a https proxy with insecure certificates, then don't use "strict-ssl false" or "insecure" proxy because it does not make sense – filipe Jun 02 '19 at 13:03

0 Answers0