如何清除NPM之前的ssl代理设置?好吧,我搜索了很多,但我得到的所有帖子主要是关于如何set在企业网络中代理.
我尝试将代理设置为空:
npm config set http-proxy
npm config set https-proxy
Run Code Online (Sandbox Code Playgroud)
第一个命令通过,第二个命令警告:
npm WARN invalid config proxy=""
npm WARN invalid config Must be a full url with 'http://'
Run Code Online (Sandbox Code Playgroud)
警告是否可以忽略,我已成功清除代理设置?
sra*_*sra 405
以上都没有帮助我,但这样做:
npm config rm proxy
npm config rm https-proxy
Run Code Online (Sandbox Code Playgroud)
资料来源:http://jonathanblog2000.blogspot.ch/2013/11/set-and-reset-proxy-for-git-and-npm.html
Aar*_*ron 120
尝试删除它们:
npm config delete proxy
npm config delete https-proxy
Run Code Online (Sandbox Code Playgroud)
小智 38
npm config rm proxy
npm config rm https-proxy
unset HTTP_PROXY
unset HTTPS_PROXY
unset http_proxy
unset https_proxy
Run Code Online (Sandbox Code Playgroud)
该死的终于在Debian Jessie中安装了privoxy(广告卸妆),谢谢:-)
Ana*_*uza 30
这已经回答了,但我认为--global配置没有正确覆盖.
通过运行npm config rm proxy从用户配置中删除代理.
这可以通过运行:npm config list.
如果在全局配置中有设置proxy或https-proxy设置,则必须--global在命令中使用它来删除它.
所以最后这将从本地和全局配置中清除代理:
npm config rm proxy
npm config rm https-proxy
npm config --global rm proxy
npm config --global rm https-proxy
Run Code Online (Sandbox Code Playgroud)
nag*_*agu 20
如果您浏览npm配置文档,它会说:
代理
默认值:HTTP_PROXY或http_proxy环境变量,或null
输入:url
因此,要禁用代理的使用,proxy必须将设置设置为null.要将代理值设置为null,必须确保未设置HTTP_PROXY或http_proxy环境变量.因此,取消设置这些环境变量并确保npm config ls -l显示proxy = null.
此外,重要的是要注意:
如果npm将代理设置类型设置为布尔值以打开/关闭代理使用情况会更好.或者,他们可以引入一种use_proxy类型为boolean 的新设置.
Mic*_*Hua 18
默认值npm是从中查找包https://registry.npmjs.org.您还需要做的是覆盖registry和strict-ssl值.
npm config set registry "http://registry.npmjs.org"
npm config set strict-ssl false
Run Code Online (Sandbox Code Playgroud)
Sha*_*thi 18
我使用以下命令删除任何代理集:
npm config rm proxy
npm config rm https-proxy
Run Code Online (Sandbox Code Playgroud)
它解决了我的问题:)
M. *_*can 17
在最新版本npm rm proxy中不起作用。改为使用npm rm http-proxy
npm config rm proxy
npm config rm https-proxy
han*_*man 16
有一种删除或删除npm代理的简单方法.
npm config delete proxy
npm config delete https-proxy
Run Code Online (Sandbox Code Playgroud)
小智 14
我曾经遇到过同样的问题.
按照以下步骤删除代理值:
1.在npm中删除代理:(
-g很重要)
npm config delete proxy -g
npm config delete http-proxy -g
npm config delete https-proxy -g
使用以下命令检查npm配置文件:
npm config list
2.删除系统代理:
set HTTP_PROXY=null
set HTTPS_PROXY=null
现在关闭命令行并打开它以刷新变量(代理).
Jam*_*ard 12
在Windows 7中运行npm版本2.10.1,我使用:
npm config delete proxy
npm config delete https-proxy
Run Code Online (Sandbox Code Playgroud)
ven*_*668 11
这有效
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
Run Code Online (Sandbox Code Playgroud)
小智 11
上面没有任何东西对我有效.我必须编辑文件".npmrc",它将位于用户主目录下(例如:c:\ users\abcuser):
http_proxy=null
registry=https://registry.npmjs.org/
strict-ssl=true
proxy=null
Run Code Online (Sandbox Code Playgroud)
从npm删除任何配置的最简单方法是编辑npm配置文件.这只需要两(2)个命令; 一个打开npm配置文件进行编辑,另一个打开确认更改.
npm config list以查看所有活动的npm配置的列表.npm config edit以使用npm配置打开文本编辑器.删除代理行(或简单地将其注释掉).npm config list以确认已删除代理配置.这就是生活!
我尝试了这个页面上列出的所有内容,没有工作,然后我尝试了配置编辑.它立即起作用.(我使用的是Windows 10)
小智 8
尝试这个,
npm config 删除 http-proxy
npm config 删除 https 代理
npm 配置 rm 代理
npm 配置 rm https-proxy
设置 HTTP_PROXY=null
设置 HTTPS_PROXY=null
npm config delete proxy -g
Run Code Online (Sandbox Code Playgroud)
为我工作.
-g很重要,因为最初它是用该选项设置的.您可以检查配置为:
npm config list
Run Code Online (Sandbox Code Playgroud)
我认为这不是http代理而是代理:
npm config set proxy="http://yourproxyhere"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
305337 次 |
| 最近记录: |