Skip to content
/ mclone Public
forked from nulastudio/mclone

mclone - 麻麻再也不用担心拉取GitHub代码慢了

License

Notifications You must be signed in to change notification settings

XljBear/mclone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mclone

体验飞一般的clone速度

对比

git clone

git clone

git mclone

git mclone

限制

  1. 仓库大小:<500M
  2. LFS支持:未知

使用

git clone换成git mclone,完事

安装

Windows

cmd

powershell Invoke-Expression (New-Object Net.WebClient).DownloadString(\"https://gitee.com/liesauer/mclone/raw/v1.1.0/script/install.ps1\")

powershell

Invoke-Expression (New-Object Net.WebClient).DownloadString("https://gitee.com/liesauer/mclone/raw/v1.1.0/script/install.ps1")

Linux/MacOS

curl

sudo bash -c "$(curl -fsSL https://gitee.com/liesauer/mclone/raw/v1.1.0/script/install.sh)"

wget

sudo bash -c "$(wget https://gitee.com/liesauer/mclone/raw/v1.1.0/script/install.sh -O -)"

卸载

Windows

cmd

powershell Invoke-Expression (New-Object Net.WebClient).DownloadString(\"https://gitee.com/liesauer/mclone/raw/v1.1.0/script/uninstall.ps1\")

powershell

Invoke-Expression (New-Object Net.WebClient).DownloadString("https://gitee.com/liesauer/mclone/raw/v1.1.0/script/uninstall.ps1")

Linux/MacOS

curl

sudo bash -c "$(curl -fsSL https://gitee.com/liesauer/mclone/raw/v1.1.0/script/uninstall.sh)"

wget

sudo bash -c "$(wget https://gitee.com/liesauer/mclone/raw/v1.1.0/script/uninstall.sh -O -)"

FAQ

mclone是如何实现的?

先将仓库镜像到码云,再从码云拉取镜像仓库。

后端代码为什么不开源?

mclone项目后端代码使用了大量的模拟请求到码云来实现自动代理下载,如果后端代码开源,一旦码云进行了限制(应该不会这么小气8?但谁知道呢),如验证码等手段,将会对mclone造成致命打击,甚至可能会威胁到mclone的存在意义(如果每mclone一次都需要破解好几个验证码,这谁顶得住?)。但若有大量请求需要开源,可能会考虑开源。

我能自己部署mclone后端程序吗?应该怎么部署?

开源后就能。开源后必定有部署教程。

为什么卡在等待代码同步完成中半天都没反应?

  1. mclone的仓库较大(其实大仓库镜像也很快的说,超过15分钟一般来说都是第二种情况了)
  2. 码云目前镜像仓库采用的是队列的方式,也就是说当前如果有很多待同步的仓库的话,可能会卡很久,甚至半天都没轮到你的仓库同步,这个我们没有办法解决,只能等待或者过段时间再试。

如何拉取私有仓库?

提前声明:请不要使用mclone拉取私有仓库,如确有需要,也请不要拉取特别重要的私有仓库,因为有可能面临仓库泄露的风险!

  1. 进入GitHub->Setting->Developer settings->Personal access tokens页面,点击Generate new token新增一个Token,Note填写mclone,勾选repo,千万别勾别的!点击Generate token即可添加一条Token。Token只显示一次,如有多次需要,可复制保存下来方便以后使用。

  2. 修改clone地址(仅支持HTTPS、不支持SSH),比如原地址为https://github.com/username/private-repo.git则修改为https://username:[email protected]/username/private-repo.git,将地址中的token替换为你实际的token。示例:https://liesauer:[email protected]/liesauer/mclone-private-demo.git

  3. 使用新地址进行mclone。

拉取私有仓库存在哪些风险?

  1. Token泄露(间接导致私有仓库泄露)
  2. 私有仓库泄露

当然这些风险都是将近不可能的,但仍需引起注意。

拉取私有仓库为什么存在这些风险?

  1. 开发者盗用了Token
  2. 码云盗用了Token
  3. mclone后端服务器遭到攻击
  4. 接入了不安全的网络,导致被监控窃听
  5. mclone过程中发生异常(如不正常退出、码云服务器出现异常),导致无法清理仓库,从而导致码云上的镜像仓库处于持续公开状态。

我的账号出现异常行为或者怀疑我的仓库已泄露,应该怎么处理?

  1. 如果你的账号在mclone之后出现异常行为,进入GitHub->Setting->Developer settings->Personal access tokens页面,并点击Delete将之前添加的mclone Token删除,并请及时修改密码。

  2. 如果你怀疑你的仓库已泄露,请及时联系开发者沟通。

About

mclone - 麻麻再也不用担心拉取GitHub代码慢了

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 73.4%
  • PowerShell 13.3%
  • Makefile 8.3%
  • Shell 5.0%