Gitee 仓库迁到内网:同步代码、权限和断网后怎么构建
这篇讲怎么把 Gitee 仓库迁进内网 AngusGit,并在断开外网后继续构建。看完你可以按仓库是公开还是私有,选择导入或 git clone --bare 再推送,在 设置 → 访问 按只读、读写、管理员重新授权,并把运行器镜像、构建镜像和依赖代理准备在内网。 先登录 AngusGit。下文推送用的是 SSH。本机没有 ~/.ssh/id_ed25519.pub 时,执行 ssh-keygen -t ed25519 -C "you@example.com" ,路径直接回车,把 cat ~/.ssh/id_ed25519.pub 里以 ssh-ed25519 开头的一行登记到 我的 → SSH密钥 ,点 添加密钥 。地址写成 ssh://git@主机:2222/所有者/仓库.git ,用户名是 git 。改用 HTTPS 时,到 我的 → 访问令牌 点 生成新令牌 , 密码验证…
Gitee repositories can be migrated to the internal network called AngusGit, allowing code, permissions, and offline build construction. To do this, choose whether to import or clone the repository, adjust access permissions (read-only, read-write, or admin), and prepare runtimes, build images, and dependency proxies within the internal network.
Log in to AngusGit, use SSH for push commands, and create an SSH key if necessary. For private repositories, cloning and pushing from an offline computer is required. The default branches in Gitee are 'master', which should be renamed to 'main' before pushing to AngusGit. Public repositories can be imported directly, while private repositories or those with history require cloning and pushing.
After migration, check if the branches and commits are consistent between Gitee and AngusGit. Finally, set the repository as read-only or archive it on Gitee.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.