shortstheory
shortstheory

Reputation: 480

How do I setup GitLab like mirroring in GitHub?

I have a collection of projects from different people in different personal repositories I want to upload into to a college GitHub organisation. Ideally, the organisation will be read only and will directly mirror the personal repos.

While, creating 2 push URLs for a repo is an option, I feel this approach will have problems for collaboration as one would have to set a user as a collaborator for both the college organisation and the personal repo. Thus, I want to implement a mirroring system similar to what GitLab does. Is there anyway I can do this using GitHub using webhooks if necessary?

Upvotes: 1

Views: 215

Answers (1)

VonC
VonC

Reputation: 1329232

You would need webhook only if those projects (you want to mirror) are themselves on GitHub.

If they are on their own private server (like a self-hosted one), a post-receive hook would be enough to push what has just been received to a GitHub mirror repo.
If those server are self-hosted GitLab ones, you can configure them to push to GitHub.

If not, you need to install a service like Fiware/tools.Webhook on a server in order to listen to a webhook payload and trigger the mirroring.

Upvotes: 1

Related Questions