Quoting Ignasi <[email protected]>:

Maybe if we recreate the repos with the --mirror option [1] itis then
properly shown as a mirror.

Regarding synchronization, if possible it would be cleaner and better to
setup a server side git hook [2] to push the changes to the mirror in the
'post-receive' stage.

Sounds like the cleanest option, but I don't know whether we are able to set up hooks in the Apache Git repos.

Failing that, we can certainly set up a scheduled job on CloudBees to do that. Shouldn't even be a problem with credentials, as I'd imagine we'd simply be doing a clean checkout from the Apache repo and then copying that over (using the --mirror command?)?

I've just set up an experimental job to try this to one of my repos:

https://jclouds.ci.cloudbees.com/job/EXPERIMENTAL-mirror-apache-to-demobox/

It uses a deploy key (i.e. not *my* key) stored in the "private" area of the CloudBees account which only has rights to the mirror repo.

Obviously, there is still potential of the key being leaked, but I figure the worst case scenario is that bad stuff gets pushed to my mirror repo. Since that's a read-only mirror in any case, and should be overwritten regularly, this would seem acceptable to me..?

ap

Reply via email to