1

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?

shortstheory
  • 470
  • 5
  • 17

1 Answers1

1

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Yes, the projects which I want to mirror are all on personal GitHub repos. How would I go about mirroring from here? – shortstheory Aug 16 '16 at 04:12
  • @shortstheory add a post-receive hook on your GitHub server side, as described in http://stackoverflow.com/a/21998477/6309 – VonC Aug 16 '16 at 05:58