使用 Gitlab 连接 Github 个项目

Connect Github project with Gitlab

有没有办法将 GitLab 项目与 Github 连接起来?我的意思是当我推送或对 Gitlab 项目进行任何修改时,它应该自动完成到 Github 中的另一个相同副本。 有办法吗?

是的。 Gitlab 为所有层提供开箱即用的 Repository mirroring

Repository mirroring allows for the mirroring of repositories to and from external sources. You can use it to mirror branches, tags, and commits between repositories. It helps you use a repository outside of GitLab.

A repository mirror at GitLab updates automatically. You can also manually trigger an update at most once every five minutes on GitLab.com with the limit set by the administrator on self-managed instances.

There are two kinds of repository mirroring supported by GitLab:

  • Push: for mirroring a GitLab repository to another location.
  • Pull: for mirroring a repository from another location to GitLab.

我用它在 Github 和 Gitlab 之间同步我的存储库,对我来说工作正常