如何清除NPM之前的ssl代理设置? 嗯,我搜索了很多,但我得到的所有帖子主要是关于如何在公司网络中设置代理。

我试图设置代理为空:

npm config set http-proxy
npm config set https-proxy

第一个命令传递,第二个命令警告说:

npm WARN invalid config proxy=""
npm WARN invalid config Must be a full url with 'http://'

警告是否可忽略,我是否已成功清除代理设置?


当前回答

在我的情况下(基于Ubuntu的Linux Mint 16),我必须:

NPM配置删除http -proxy 清除https_proxy Bash环境参数——奇怪的是,尽管我在任何地方都找不到这个行为,npm回退到https_proxy: $ http_proxy= " https_proxy= " NPM config get http -proxy 零 $ http_proxy= " xxhttps_proxy= " NPM config get http -proxy https://1.2.3.4:8080

其他回答

执行NPM配置列表 它将列出所有代理的值。在我的情况下,代理值从全局NPMRC文件中获取,删除它,并能够在我的Windows机器上完成NPM安装

这是

npm config delete http-proxy
npm config delete https-proxy

npm config rm proxy
npm config rm https-proxy

set HTTP_PROXY=null
set HTTPS_PROXY=null
npm config delete http-proxy
npm config delete https-proxy

npm config delete proxy -g
npm config delete http-proxy -g

then

npm config get proxy

also

npm i -g bower to update

NPM在代理上有一个错误

在默认值下,npm从https://registry.npmjs.org寻找包。您还需要重写注册表和严格ssl值。

npm config set registry "http://registry.npmjs.org"
npm config set strict-ssl false

尝试用以下方法删除它们:

npm config delete proxy
npm config delete https-proxy