Two commands is needed. Assume HTTP
protocol is being uses, and the proxy server hostname is proxy.exmaple.com
, and the port is 8080
.
npm config set proxy http://proxy.example.com:8080 npm config set https-proxy http://proxy.example.com:8080
Assume the user log in name is username
, and the password is password
:
npm config set proxy http://username:[email protected]:8080 npm config set https-proxy http://username:[email protected]:8080
Assume the user log in name is username
, and the password is password
:
npm config get proxy npm config get https-proxy
Assume the user log in name is username
, and the password is password
:
npm config delete proxy npm config delete https-proxy