Web前端环境加速

https://www.jianshu.com/p/7ed715c7ee45

域名查找ip
https://www.ipaddress.com/

windows host路径
C:\Windows\System32\drivers\etc

centos修改host
sudo gedit /etc/hosts
修改完执行/etc/init.d/network restart命令 使得hosts生效
出现无法建立ssl连接可尝试下面方法 如果成功则是验证证书失败导致的问题
wget github.com --no-check-certificate

修改host
140.82.112.4 github.com
185.199.108.153 assets-cdn.github.com
199.232.69.194 github.global.ssl.fastly.net


npm修改源
获取原来的镜像地址
npm get registry
修改源
npm config set registry http://registry.npm.taobao.org/

npm安装依赖时出现 fatal: unable to connect to github.com 而且通过https方式可以访问到github时可尝试下面方法
原因:需要用https才能读到数据
执行 git config --global url."https://".insteadOf git://

 

posted @ 2022-06-15 16:53  王新_qq邮箱842255139  阅读(18)  评论(0编辑  收藏  举报