45.解决github仓库下载慢问题

2020年04月12日19:06:19

解决github仓库下载慢问题

2个解决办法,一个是借助码云,最后修改配置文件重新导向github网址。

二十修改host文件,配置github的ip。

1.借助码云

比如下载Fabric仓库

https://github.com/hyperledger/fabric

git clone https://github.com/hyperledger/fabric.git

image-20200412191054711

码云主页面:https://gitee.com/fengnanzi/dashboard

image-20200412191117599

导入成功后

image-20200412191224974

在本地clone下来

image-20200412191311799

展示远程分支:
git branch --remote

image-20200412191525847

显示隐藏文件
ls -a

image-20200412191648194

修改配置文件config

vim .git/config

修改url

image-20200412191919560

或者命令行设置
git remote set  -url

2.修改host文件

http://tool.chinaz.com/dns?type=1&host=&ip=

image-20200412192556272

服务器host地址

一般在/etc/hosts

END

猜你喜欢

转载自www.cnblogs.com/oneapple/p/12687083.html