-
I'm working on mirroring a private repository from an individual GitHub account to a repository within a University of Illinois organization. How can I set up the mirror so that it automatically updates to reflect any changes in the code and documentation of the original private repository? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I honestly would be tempted in this situation to stick with one repository and do one of...
Especially if all changes in private are just going to end up on the public. After all, you can setup in the project who can commit and the like even in a public repo. If you're doing more of a procedure like you want commits to a main branch to be "synced" from private to public, a github action might do a trick. You'll ant to set up a deploy key, ssh key or Oauth token for the public repo and put it in the GitHub Actions secrets. Then have a github actions workflow that checkouts the prviate repo, changes the remote for main to the public one, and push to that. There's probably better ways, but this is what comes to mind. Warning - this would definitely become brittle if change start to be made to the public end as well. The automated pushes on the private could start failing with merge conflicts. |
Beta Was this translation helpful? Give feedback.
I honestly would be tempted in this situation to stick with one repository and do one of...
Especially if all changes in private are just going to end up on the public. After all, you can setup in the project who can commit and the like even in a public repo.
If you're doing more of a procedure like you want commits to a main branch to be "synced" from private to public, a github action might do a trick. You'll ant to set up a deploy key, ssh key or Oauth toke…