一、错误来源
在下载node.js包管理工具时发现居然连接不上地址,错误如下:
二、分析与解决
1、测试链接
经过测试,发现连接不上,访问被拒绝。
2、查询网址信息
网站IP地址查询连接:https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com
查询结果如下:
3、配置hosts
使用的软件是SwitchHosts,SwitchHosts 一个修改、管理、切换多个 hosts 方案的开源工具。
下载地址:https://oldj.github.io/SwitchHosts/#cn
4、结果
重新输入命令,下载nvm工具成功。
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash