Mirror two git remotes
(alternate description: containerize everything!)
It periodically fetches an origin
repo. If the last commit of a branch on the watchlist changed, it pushes that branch to the destination
. It does not need to checkout or pull everything locally.
Whether you use a container or call the Python script directly, set the following parameters as environment variables:
ORIGIN_URL
: remote URL of the origin repoDESTINATION_URL
: remote URL of the destination repoBRANCHES_LIST
: list of branches to update, e.g. [branch1,branch2,branch3]UPDATE_PERIOD
: delay between updates (seconds) [default: 60]
This currently expects one-time authentication methods in the remote URL itself. It does not currently use GIT_ASKPASS
.
- tokens on GitHub (e.g. remote URL:
https://<token>@github.com/<username>/<repo>.git
) - username/password authentication over HTTPS (e.g. remote URL:
https://<username>:<password>@github.com/<username>/<repo>.git
) or SSH