Github镜像加速器-FastGit

科技一颗大心心 2024-03-04 15:52:47
简介

FastGit 是一个对于 GitHub.com 的镜像加速器。使用共享资源为 GitHub 加速。

FastGit中文指南

#基本使用

关于 FastGit 的使用,本质上与 git 有关。常规的面向 GitHub 的 clone 命令可能如下:

git clone https://github.com/author/repo

使用 FastGit 时,可使用如下命令:

git clone https://hub.fgit.cf/author/repo

正如您所见, FastGit 仅仅是 GitHub 的代理,所以我们仅需要替换远程地址。

当然,您也可以直接修改 git 的配置,使用 FastGit 替换所有指向 GitHub 的链接:

git config --global url."https://hub.fgit.cf/".insteadOf "https://github.com/"git config protocol.https.allow always

实例:

git clone https://github.com/BC-SECURITY/Starkiller.gitgit clone https://hub.fgit.cf/BC-SECURITY/Starkiller.git

#Web使用

对于常见的 GitHub Web 操作, FastGit 的基础节点也提供了最基本的支持。您可以直接访问包含有 Web 支持的节点。出于安全考虑,我们会禁用包括 Cookie 以及 Session 等敏感权限。这意味着您不能登录进行操作。

https://hub.fgit.cf/BC-SECURITY/Starkiller

#Release 和源码存档的下载

对于正常的 clone , push 操作,FastGit 已经提供了相当完善的操作。对于 Release 和源码存档的下载,我们可以使用如下方法进行操作。

# Release# 假设下载链接为 https://github.com/A/A/releases/download/1.0/1.0.tar.gzwget https://hub.fgit.cf/A/A/releases/download/1.0/1.0.tar.gz# Codeload# 假设下载链接为 https://hub.fgit.cf/A/A/archive/master.zip# 或者 https://codeload.github.com/A/A/zip/masterwget https://hub.fgit.cf/A/A/archive/master.zip

示例:下载项目的Release

wget https://hub.fgit.cf/BC-SECURITY/Starkiller/archive/refs/tags/v2.7.1.zip

#对于 raw 的代理

我们同样对 https://raw.githubusercontent.com/ 进行了代理,地址为 https://raw.fgit.cf/

0 阅读:0

科技一颗大心心

简介:感谢大家的关注