0624-gitlab to github sync
🎯目标
🧱一、准备工作
✅ 1. 在 GitHub 上创建一个空仓库
https://github.com/yourusername/your-repo.git✅ 2. 在 GitHub 获取一个 Access Token
✅ 3. 在 GitLab 项目中设置 CI/CD 环境变量
Key
Value
Notes
⚙️二、配置 .gitlab-ci.yml
.gitlab-ci.yml🧪三、验证是否生效
📌 四、注意事项
🚫 不建议直接写 token 到 .gitlab-ci.yml
.gitlab-ci.yml🧩 --mirror 和 --all 的区别
--mirror 和 --all 的区别🧱五、进阶:使用 SSH 而非 Token(可选)
✅ 六、同步效果总结
Last updated