深圳全飞鸿

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 846|回复: 0
打印 上一主题 下一主题

npm设置和取消代理的方法

[复制链接]

800

主题

1379

帖子

7725

积分

版主

Rank: 7Rank: 7Rank: 7

积分
7725
跳转到指定楼层
楼主
发表于 2020-2-18 15:29:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
npm设置和取消代理的方法

设置代理

npm config set proxy=http://127.0.0.1:8087
npm config set registry=http://registry.npmjs.org

关于https

经过上面设置使用了http开头的源,因此不需要设https_proxy了,否则还要增加一句:

npm config set https-proxy http://server:port

代理用户名和密码

npm config set proxy http://username:password@server:port
npm confit set https-proxy http://username:password@server:port

取消代理

npm config delete proxy
npm config delete https-proxy


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|nagomes  

GMT+8, 2025-6-29 01:14 , Processed in 0.075289 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表