mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
help: transpile from mirrorz-help
This commit is contained in:
parent
6e97a65364
commit
35cea97803
|
|
@ -4,24 +4,84 @@ layout: help
|
|||
mirrorid: binutils-gdb.git
|
||||
---
|
||||
|
||||
## GNU Binutils 和 GDB 等项目 Git 镜像使用帮助
|
||||
# GDB Git 镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
如需克隆 Binutils 等项目的代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/binutils-gdb.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/binutils-gdb.git
|
||||
```
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
若要将 mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git remote add mirror {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/binutils-gdb.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
||||
{% raw %}
|
||||
<script id="template-2" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-2" class="language-bash" data-template="#template-2" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将默认上游设置为镜像站
|
||||
|
||||
|
|
|
|||
|
|
@ -4,18 +4,52 @@ layout: help
|
|||
mirrorid: crates.io-index.git
|
||||
---
|
||||
|
||||
## Rust crates.io 索引镜像使用帮助
|
||||
# Rust crates.io 索引镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
编辑 `~/.cargo/config` 文件,添加以下内容:
|
||||
|
||||
```
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
[source.crates-io]
|
||||
replace-with = 'tuna'
|
||||
replace-with = 'mirror'
|
||||
|
||||
[source.tuna]
|
||||
registry = "https://{{ site.hostname }}/git/crates.io-index.git"
|
||||
```
|
||||
[source.mirror]
|
||||
registry = "{{http_protocol}}{{mirror}}"
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
该镜像可加快 cargo 读取软件包索引的速度。
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-toml" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
在可能的情况下推荐使用 [Rust crates.io 稀疏索引镜像](/help/crates.io-index)
|
||||
|
||||
在可能的情况下推荐使用 [Rust crates.io 稀疏索引镜像](/help/crates.io-index/)
|
||||
|
|
|
|||
|
|
@ -4,21 +4,71 @@ layout: help
|
|||
mirrorid: flutter-sdk.git
|
||||
---
|
||||
|
||||
## Flutter SDK 源码镜像使用帮助
|
||||
# Flutter SDK 镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
Flutter SDK 默认从 Github 获取更新,如您访问 Github 速度慢,可以在 Flutter 目录下运行命令:
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/flutter-sdk.git
|
||||
```
|
||||
|
||||
将上游设置为 TUNA 镜像。
|
||||
|
||||
或者通过下面的命令,直接从 Master 构建渠道检出 Flutter 的 SDK:
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
```
|
||||
git clone -b master https://{{ site.hostname }}/git/flutter-sdk.git
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将上游设置为镜像站。
|
||||
|
||||
或者通过下面的命令,直接从 Master 构建渠道检出 Flutter 的 SDK:
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git clone -b master {{http_protocol}}{{mirror}}
|
||||
./flutter-sdk/bin/flutter --version
|
||||
```
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
您也可以替换上述代码中 `git clone -b` 之后的 `master` 为 `beta` 获取 Beta 渠道的构建、替换为 `dev` 获取 Dev 渠道的构建。
|
||||
|
||||
Flutter 镜像使用方法参见 [Flutter 镜像安装帮助](/help/flutter)。
|
||||
|
||||
Flutter 镜像使用方法参见 [Flutter 镜像安装帮助](../flutter)。
|
||||
|
|
@ -4,24 +4,84 @@ layout: help
|
|||
mirrorid: gcc.git
|
||||
---
|
||||
|
||||
## GCC Git 镜像使用帮助
|
||||
# GCC Git 镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
如需克隆 GCC 代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/gcc.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/gcc.git
|
||||
```
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
若要将 mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git remote add mirror {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/gcc.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
||||
{% raw %}
|
||||
<script id="template-2" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将默认上游设置为镜像站
|
||||
|
||||
|
|
|
|||
|
|
@ -4,24 +4,84 @@ layout: help
|
|||
mirrorid: glibc.git
|
||||
---
|
||||
|
||||
## GNU C Library Git 镜像使用帮助
|
||||
# GNU C Library (glibc) Git 镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
如需克隆 GNU C Library 代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/glibc.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/glibc.git
|
||||
```
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
若要将 mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git remote add mirror {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/glibc.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
||||
{% raw %}
|
||||
<script id="template-2" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将默认上游设置为镜像站
|
||||
|
||||
|
|
|
|||
|
|
@ -4,26 +4,84 @@ layout: help
|
|||
mirrorid: linux-firmware.git
|
||||
---
|
||||
|
||||
## Linux 固件仓库 Git 镜像使用帮助
|
||||
# Linux Firmware Git 镜像使用帮助
|
||||
|
||||
如需克隆 Linux 固件仓库,使用
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/linux-firmware.git
|
||||
```
|
||||
|
||||
若要将 tuna mirror 加入已有仓库,可在已有仓库中运行
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
如需克隆 Linux Firmware 代码,使用
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
若要将 mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git remote add mirror {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/linux-firmware.git
|
||||
```
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/linux-firmware.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像。
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-2" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将默认上游设置为镜像站
|
||||
|
||||
|
|
|
|||
|
|
@ -2,5 +2,86 @@
|
|||
category: help
|
||||
layout: help
|
||||
mirrorid: linux-next.git
|
||||
redirect_help_id: linux.git
|
||||
---
|
||||
|
||||
# Linux Next Git 镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
如需克隆 Linux Next 代码,使用
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
若要将 mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git remote add mirror {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
或运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-2" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将默认上游设置为镜像站
|
||||
|
||||
|
|
|
|||
|
|
@ -2,5 +2,86 @@
|
|||
category: help
|
||||
layout: help
|
||||
mirrorid: linux-stable.git
|
||||
redirect_help_id: linux.git
|
||||
---
|
||||
|
||||
# Linux Stable Git 镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
如需克隆 Linux Stable 代码,使用
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
若要将 mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git remote add mirror {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
或运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-2" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将默认上游设置为镜像站
|
||||
|
||||
|
|
|
|||
|
|
@ -4,29 +4,86 @@ layout: help
|
|||
mirrorid: linux.git
|
||||
---
|
||||
|
||||
## Linux Kernel Git 镜像使用帮助
|
||||
# Linux Git 镜像使用帮助
|
||||
|
||||
本项目包含三个镜像:`linux.git`, `linux-stable.git`, `linux-next.git`,分别是主分支、稳定版分支和开发分支。在使用时,请自行更改路径中相应的仓库名称。
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
如需克隆主线 linux 代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/linux.git
|
||||
```
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2,#content-3">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
若要将 tuna mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/linux.git
|
||||
```
|
||||
|
||||
如需克隆 Linux 代码,使用
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
若要将 mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git remote add mirror {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/linux.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像
|
||||
|
||||
{% raw %}
|
||||
<script id="template-2" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将默认上游设置为镜像站
|
||||
|
||||
### 增量下载
|
||||
|
||||
|
|
@ -34,8 +91,21 @@ git remote set-url origin https://{{ site.hostname }}/git/linux.git
|
|||
|
||||
以树莓派为例,具体操作为
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/linux.git
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-3" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
git remote add rasp https://github.com/raspberrypi/linux.git
|
||||
git fetch rasp
|
||||
```
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-3" class="language-bash" data-template="#template-3" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,30 +4,94 @@ layout: help
|
|||
mirrorid: qemu.git
|
||||
---
|
||||
|
||||
## QEMU Git 镜像使用帮助
|
||||
# QEMU Git 镜像使用帮助
|
||||
|
||||
如需克隆 QEMU 代码及其子模块,使用以下脚本(实验性功能)
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
## 实验性脚本(仅 TUNA 提供)
|
||||
|
||||
如需克隆 QEMU 代码及其子模块,使用以下脚本
|
||||
|
||||
```
|
||||
curl https://{{ site.hostname }}/git/qemu/qemu.sh | bash
|
||||
curl https://mirrors.tuna.tsinghua.edu.cn/git/qemu/qemu.sh | bash
|
||||
```
|
||||
|
||||
## 手动克隆
|
||||
|
||||
如仅需克隆 QEMU 代码,使用
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/qemu.git
|
||||
```
|
||||
|
||||
若要将镜像站加入已有代码库,可在已有仓库中运行
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/qemu.git
|
||||
```
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
若要将 mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git remote add mirror {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
或运行
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/qemu.git
|
||||
```
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-2" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将默认上游设置为镜像站
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,30 @@ layout: help
|
|||
mirrorid: llvm-project.git
|
||||
---
|
||||
|
||||
## LLVM Git 源码仓库镜像使用帮助
|
||||
# LLVM Project Git 镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1,#content-2">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
本镜像镜像了如下仓库:
|
||||
|
||||
|
|
@ -12,21 +35,63 @@ mirrorid: llvm-project.git
|
|||
https://github.com/llvm/llvm-project.git
|
||||
```
|
||||
|
||||
可以直接使用 `git clone https://{{ site.hostname }}/git/llvm-project.git` 来克隆。由于仓库体积均较大,执行`git clone`可能需要较长时间,并且没有进度提示,请耐心等候。
|
||||
|
||||
若要将 TUNA mirror 加入已有代码库,可在已有仓库中运行:
|
||||
|
||||
```
|
||||
git remote add tuna https://{{ site.hostname }}/git/llvm-project.git
|
||||
```
|
||||
|
||||
或运行:
|
||||
|
||||
```
|
||||
git remote set-url origin https://{{ site.hostname }}/git/llvm-project.git
|
||||
```
|
||||
|
||||
将默认上游设置为 TUNA 镜像。
|
||||
如需克隆代码,使用
|
||||
|
||||
|
||||
注:如需要各个子项目的发布版本代码,请至 [GitHub Release 镜像](https://{{ site.hostname }}/github-release/llvm/llvm-project/) 下载。
|
||||
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-plaintext" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
由于仓库体积均较大,执行`git clone`可能需要较长时间,并且没有进度提示,请耐心等候。
|
||||
|
||||
若要将 mirror 加入已有代码库,可在已有仓库中运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git remote add mirror {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-plaintext" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
或运行
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-2" type="x-tmpl-markup">
|
||||
git remote set-url origin {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-2" class="language-plaintext" data-template="#template-2" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
将默认上游设置为镜像站
|
||||
|
||||
注:如需要各个子项目的发布版本代码,请至 [GitHub Release 镜像](/help/github-release) 中 llvm-project 一节。
|
||||
|
||||
|
|
|
|||
|
|
@ -4,21 +4,69 @@ layout: help
|
|||
mirrorid: ohmyzsh.git
|
||||
---
|
||||
|
||||
## ohmyzsh Git 镜像使用帮助
|
||||
# ohmyzsh Git 镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
### 安装
|
||||
|
||||
在本地克隆后获取安装脚本。
|
||||
|
||||
```
|
||||
git clone https://{{ site.hostname }}/git/ohmyzsh.git
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
cd ohmyzsh/tools
|
||||
REMOTE=https://{{ site.hostname }}/git/ohmyzsh.git sh install.sh
|
||||
```
|
||||
REMOTE={{http_protocol}}{{mirror}} sh install.sh
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
### 切换已有 ohmyzsh 至镜像源
|
||||
|
||||
```
|
||||
git -C $ZSH remote set-url origin https://{{ site.hostname }}/git/ohmyzsh.git
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git -C $ZSH remote set-url origin {{http_protocol}}{{mirror}}
|
||||
git -C $ZSH pull
|
||||
```
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,27 +3,82 @@ category: help
|
|||
layout: help
|
||||
mirrorid: pkgsrc.git
|
||||
---
|
||||
## pkgsrc.git 镜像使用帮助
|
||||
|
||||
**注:该镜像是 pkgsrc 源码安装的镜像。本镜像站同时提供 pkgsrc 其他功能的镜像(如二进制包,distfile 等,不包含 joyent 内容),请参考 [pkgsrc 镜像使用帮助](https://{{ site.hostname }}/help/pkgsrc/)。**
|
||||
# pkgsrc Git 镜像使用帮助
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 HTTPS</label>
|
||||
<select id="http-select" class="form-control content-select" data-target="#content-0,#content-1">
|
||||
<option data-http_protocol="https://" selected>是</option>
|
||||
<option data-http_protocol="http://">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label>是否使用 sudo</label>
|
||||
<select id="sudo-select" class="form-control content-select" data-target="#content-0,#content-1">
|
||||
<option data-sudo="sudo " selected>是</option>
|
||||
<option data-sudo="">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
**注:该镜像是 pkgsrc 源码安装的镜像。本镜像站同时提供 pkgsrc 其他功能的镜像(如二进制包,distfile 等,不包含 joyent 内容),请参考 [pkgsrc 镜像使用帮助](/help/pkgsrc)。**
|
||||
|
||||
### 源码安装
|
||||
|
||||
对应[官方文档 getting-via-cvs](https://www.netbsd.org/docs/pkgsrc/pkgsrc.html#getting-via-cvs),本镜像站中 pkgsrc.git 镜像与官方文档中源的 CVS 架构不同,与[官方 git 镜像](https://github.com/NetBSD/pkgsrc)架构类似,故使用命令有所调整。
|
||||
|
||||
拉取特定稳定版镜像分支
|
||||
```bash
|
||||
git clone -b pkgsrc-2021Q4 https://{{ site.hostname }}/git/pkgsrc.git
|
||||
```
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone -b pkgsrc-2021Q4 {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-0" class="language-bash" data-template="#template-0" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
拉取当前镜像分支
|
||||
```bash
|
||||
git clone https://{{ site.hostname }}/git/pkgsrc.git
|
||||
```
|
||||
|
||||
|
||||
|
||||
{% raw %}
|
||||
<script id="template-1" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<p></p>
|
||||
|
||||
<pre>
|
||||
<code id="content-1" class="language-bash" data-template="#template-1" data-select="#http-select,#sudo-select">
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
### 源码更新
|
||||
|
||||
对应[官方文档 uptodate-cvs](https://www.netbsd.org/docs/pkgsrc/pkgsrc.html#uptodate-cvs),切换到 pkgsrc 目录,执行
|
||||
|
||||
```bash
|
||||
git pull
|
||||
```
|
||||
|
||||
#### 源码切换分支
|
||||
对应[官方文档 uptodate-cvs-switch](https://www.netbsd.org/docs/pkgsrc/pkgsrc.html#uptodate-cvs-switch),切换到 pkgsrc 目录
|
||||
|
||||
|
|
@ -35,3 +90,4 @@ git checkout pkgsrc-2021Q4
|
|||
```bash
|
||||
git checkout trunk
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ nixpkgs 镜像,同步源为 [https://github.com/NixOS/nixpkgs](https://github.
|
|||
{% raw %}
|
||||
<script id="template-0" type="x-tmpl-markup">
|
||||
git clone {{http_protocol}}{{mirror}}/
|
||||
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue