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?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes, the projects which I want to mirror are all on personal GitHub repos. How would I go about mirroring from here?
@shortstheory add a post-receive hook on your GitHub server side, as described in stackoverflow.com/a/21998477/6309

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.