说在前面 解决GitHub下载速度慢的方法很多,本文主要介绍通过git镜像的方式解决下载慢的问题。 主要步骤有:1、找到gitconfig文件, 2、通过git命令查看当前生效的config 配置 3
解决GitHub下载速度慢的方法很多,本文主要介绍通过git镜像的方式解决下载慢的问题。 主要步骤有:1、找到gitconfig文件, 2、通过git命令查看当前生效的config 配置 3、使用git config命令编辑并添加国内镜像源
Git 一共有3个配置文件:
# 查看配置信息# --local:仓库级,--global:全局级,--system:系统级$ git config <--local | --global | --system> -l# 查看当前生效的配置信息$ git config -l# 编辑配置文件# --local:仓库级,--global:全局级,--system:系统级$ git config <--local | --global | --system> -e# 添加配置项# --local:仓库级,--global:全局级,--system:系统级$ git config <--local | --global | --system> --add <name> <value>
由于Git是分布式的版本控制系统,可以从多个镜像源进行Git操作。这里提供一些Git镜像,我们可以将就近的Git镜像加入.git/config文件中:
中科大镜像源
[url “https://mirrors.ustc.edu.cn/git/”]
insteadOf = Https://github.com/
insteadOf = https://gitlab.com/
insteadOf = https://bitbucket.com/
2、清华大学镜像源
[url “https://mirrors.tuna.tsinghua.edu.cn/git/”]
insteadOf = https://github.com/
insteadOf = https://gitlab.com/
insteadOf = https://bitbucket.com/
3、阿里云镜像源
[url “https://code.aliyun.com/”]
insteadOf = https://github.com/
insteadOf = https://gitlab.com/
insteadOf = https://bitbucket.com/
来源地址:https://blog.csdn.net/qq_42886163/article/details/133236999
--结束END--
本文标题: MAC 如何解决GitHub下载速度慢的问题
本文链接: https://www.lsjlt.com/news/485659.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0