Skip to content

Commit 055db62

Browse files
committed
update repo-mirror
1 parent faf6d1d commit 055db62

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/content/usage/repo-mirror.zh-cn.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,16 @@ menu:
8888
4. 选择**添加推送镜像**以保存配置。
8989

9090
仓库会很快进行推送。要强制推送,请选择**立即同步**按钮。
91+
92+
### 镜像现有的 ssh 仓库
93+
94+
当前,Gitea 不支持从 ssh 仓库进行镜像。如果您想要镜像一个 ssh 仓库,您需要将其转换为 http 仓库。您可以使用以下命令将现有的 ssh 仓库转换为 http 仓库:
95+
96+
1. 确保运行 gitea 的用户有权限访问您试图从 shell 镜像到的 git 仓库。
97+
2. 在 Web 界面的版本库设置 > git 钩子中为镜像添加一个接收后钩子。
98+
99+
```
100+
#!/usr/bin/env bash
101+
git push --mirror --quiet [email protected]:username/repository.git &>/dev/null &
102+
echo "GitHub mirror initiated .."
103+
```

0 commit comments

Comments
 (0)