Hello, i have a few questions about synchronizing with an external mirror. I know that the external pull option is NOT available in the CE edition, which is why I’m looking for a workaround. We don’t need frequent synchronization — once every six months would be sufficient. Is it possible to manually “re-sync” the repository after the initial synchronization?
New Project Setup:
Create new project
Import Project
Repository by URL
Git repository URL → Github url
Create Project
Everything works as exspected
Questions?
How can we re-sync the project with the external mirror after some time?
Should we work in our own branch to make this easier?
Are there any additional details we should know about?
I don’t want to modify any workers or “hack” around the issue. It’s fine for us to trigger the synchronization manually. It doesn’t need to be an automatic process.
I’ve been using that for a while now, so basically when I make my commits to my main server, Gitlab then pushes those changes to the other server. You can also force sync manually as well if required. The docs even give an example of push mirroring from Gitlab to Github.
Hello,
thanks for the reply.
We don’t need a push, we only need to pull in order to sync with the upstream source again after some time.
For example, in our project we are currently using OpenCV 4.10. After one year, we decide to test the new version 4.20, and at that point we need to sync our GitLab repository again with the OpenCV project on GitHub.
Ah OK, I was under the assumption you wanted to use push/pull functionality as a backup of your own repositories. But either way, pull mirroring is not an option without paid subscription which means you can only use push mirroring. But that’s different from what you’ve outlined by pulling changes from an upstream server, and isn’t considered mirroring at this point.
I think the only way you are going to achieve pulling from upstream projects would be manually using the git command line tools to pull from one remote (github) and push to another (your Gitlab server). Perhaps it could be automated with CI/CD, but other than that it would mostly be manually run from the console by yourself or someone else who works on the project. And at least have different branches for that until the changes have been checked/tested and merged into your production branch, etc.
Although it is possible someone else may find this post and offer some insight in how else you might be able to achieve it.
we’ve been using myrepos to mirror repositories since long before GitLab could do this on its own. it requires a service account and diskspace on some VM to do the job.