Github 镜像网站,解决 Github 因网络无法访问
Github 是一个面向开源及私有软件项目的托管平台,其日常用户主要是程序员为主,上面优秀的开源项目不计其数。 虽然是一个程序员社区,不过因为上面涵盖内容非常广泛,各种实用资源也非常丰富,所以其实各行各业的小伙伴日常中或多或少都要接触到 github。 不过,由于一些特殊原因,github 在国内访问并不稳定。日常使用中,其官网偶尔会间接性的被屏蔽。
Github 官网:https://github.com/
Linux(Debian) 通过镜像站加速访问GitHub
镜像站并非所有Github项目都可以访问
-
方法1:修改 Git 配置(推荐)
-
通过 Git 配置 来全局修改 GitHub 的地址,此处使用 gitclone.com 镜像源演示,失效可从下面的镜像站中选择尝试
git config --global url."https://gitclone.com/github.com/".insteadOf "https://github.com/" -
查看是否配置了镜像地址
输出应该类似于:“url.https://gitclone.com/github.com/.insteadof https://github.com/”
如果没有任何输出则为默认的https://github.comgit config --global --get-regexp url
-
-
方法 2:临时使用镜像地址(手动指定)
单次使用镜像,不想全局改变 Git 配置,可以在克隆时直接使用镜像地址
git clone https://gitclone.com/github.com/用户名/仓库名.git -
方法 3:修改 git 远程地址(对于已克隆的仓库)
如果已经有了一个本地仓库,但希望它使用镜像源,可以通过修改远程仓库地址来实现
git remote set-url origin https://gitclone.com/github.com/用户名/仓库名.git -
删除镜像配置
- 清除 Git 镜像地址配置
删除镜像配置,恢复默认
git config --global --unset url."https://gitclone.com/github.com/".insteadOf - 清除特定仓库的镜像配置(如果是仓库级别配置)
如果只是想清除某个仓库的镜像配置,可以进入该仓库的目录,然后执行下面指令,只会影响当前仓库,其他仓库的设置不受影响
git config --unset url."https://gitclone.com/github.com/".insteadOf
- 清除 Git 镜像地址配置
Win通过修改 hosts 的方式加速访问 GitHub
-
github hosts 推荐
-
推荐一:Fetch GitHub Hosts
官网地址:https://hosts.gitcdn.top/ -
推荐二:
https://gitlab.com/ineo6/hosts/-/raw/master/hosts
Github 镜像网站
以下地址均收集于互联网,链接可能随时失效。
直接替换“https://github.com/”即可
- Githup Proxy官网地址:
https://github.akams.cn/ - bgithub官网地址:
https://bgithub.xyz/ - 虾壳官网地址:
https://xiake.pro/ - kkgithub官网地址:
https://kkgithub.com/ - Githup ProxyUI官网地址:
https://git.mxg.pub/ - Github文件加速官网地址:
https://github.moeyy.xyz/ - githubfast官网地址:
https://githubfast.com/ - gitclone官网地址:
https://gitclone.com/ - github 加速下载官网地址:
https://github.ur1.fun/ - Github Proxy官网地址:
https://ghfast.top/ - 算力云文档中心官网地址:
https://gh.llkk.cc/ - `hub.nuaa.cf或 hub.fgit.ml官网地址:
https://hub.nuaa.cf/
https://hub.fgit.ml/```