🚀 GitHub 镜像站

使用 Cloudflare Workers 创建的私人 GitHub 镜像站

镜像地址: https://gh.176685.xyz

✨ 功能特性

  • 代理 GitHub 主站(仓库页面、文件浏览等)
  • 代理 GitHub API 请求
  • 代理 Raw 文件请求
  • 支持 Git Clone/Pull/Push(HTTPS 协议)
  • 自动替换响应中的 GitHub URL 为镜像站 URL
  • 支持 CORS

📖 使用方法

1. 访问仓库页面

github.com 替换为 gh.176685.xyz

# 原地址
https://github.com/owner/repo

# 镜像地址
https://gh.176685.xyz/owner/repo

2. Git Clone

使用镜像站进行 git clone

# 克隆公开仓库
git clone https://gh.176685.xyz/owner/repo.git

# 克隆到指定目录
git clone https://gh.176685.xyz/owner/repo.git my-project

3. 访问 Raw 文件

https://gh.176685.xyz/raw/owner/repo/branch/file

4. 使用 API

https://gh.176685.xyz/api/repos/owner/repo

🔐 私有仓库

对于私有仓库,需要配置认证:

方法 1: 使用 Token(在 URL 中)

git clone https://YOUR_TOKEN@gh.176685.xyz/owner/repo.git

方法 2: 使用 Git 凭据助手(推荐)

git config --global credential.helper store
git clone https://gh.176685.xyz/owner/repo.git
# 然后输入你的 GitHub 用户名和 Token

⚠️ 注意事项

  • ⚠️ GitHub API 有速率限制,使用 Token 可以提高限制
  • ⚠️ 当前实现没有缓存,每次请求都会转发到 GitHub
  • ⚠️ 请确保遵守 GitHub 的服务条款

🔗 快速链接

Powered by Cloudflare Workers & Hono