Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Mirroring Eclipse Repository with Sub Modules
Mirroring Eclipse Repository with Sub Modules [message #1807168] Fri, 24 May 2019 05:22 Go to next message
Bipin Banathur is currently offline Bipin BanathurFriend
Messages: 3
Registered: May 2019
Junior Member
I am trying to mirror eclipse platform aggregator module (https://git.eclipse.org/r/platform/eclipse.platform.releng.aggregator.git) to a gitlab repository.

The purpose is to have the compete source (including submodules) hosted in the local git repo, and build eclipse platform without accessing source code from external network.

Here are the steps followed

Attempt 1
------------

1) git clone --mirror https://git.eclipse.org/r/platform/eclipse.platform.releng.aggregator.git (with and without --recurse-submodules)

2) git remote set-url --push origin ${local_repo_url}

3) git push --mirror (with and without --recurse-submodules=check)

In first attempt , the contents got pushed to local repo.
But while cloning the repository from local repo returned the following error

a) Cloned Metadata -> Successful
b) Registered SubModules -> Succesful
c) Clone Sub Modules -> Failed

Cloning into 'path/eclipse-platform/eclipse.jdt'...

remote: The project you were looking for could not be found.

fatal: repository 'local_repo_url/jdt/eclipse.jdt.git/' not found

fatal: clone of local_repo/jdt/eclipse.jdt' into submodule
path 'path/eclipse-platform/eclipse.jdt' failed
Failed to clone 'eclipse.jdt'. Retry scheduled

Attempt 2
------------

1) git clone https://git.eclipse.org/r/platform/eclipse.platform.releng.aggregator.git
--recurse-submodules (without mirror)

2)
git checkout master
git pull --recurse-submodules
git submodule update

3) git remote set-url --push origin ${local_repo_url}

4) git push --mirror --recurse-submodules=check

But cloning from local repo , failed with same error (as in Attempt 1).

Any help to mirror this EGit Repo along with submodules, to Gitab Repo , would be greatly appreciated

Thanks and Regards,
Bipin.
Re: Mirroring Eclipse Repository with Sub Modules [message #1807231 is a reply to message #1807168] Sat, 25 May 2019 07:30 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1105
Registered: July 2009
Senior Member
Where did you use EGit in this attempt to mirror the eclipse releng aggregator ?
Re: Mirroring Eclipse Repository with Sub Modules [message #1807241 is a reply to message #1807231] Sat, 25 May 2019 16:57 Go to previous messageGo to next message
Bipin Banathur is currently offline Bipin BanathurFriend
Messages: 3
Registered: May 2019
Junior Member
Hi Matthias, I did not use EGit for mirroring,

1. Can I achieve it through Egit in a better way ?
2. Which one would be the right forum to get help on this issue.

Thanks and Regards,
Bipin.
Re: Mirroring Eclipse Repository with Sub Modules [message #1807254 is a reply to message #1807241] Sun, 26 May 2019 17:10 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1105
Registered: July 2009
Senior Member
No, I think native git command line is the right tool for this.

Here some of the issues with what you tried:
- git clone --recurse-submodules cannot be combined with option --mirror since submodules are based on the concept of a working tree which a bare repository doesn't have.
- git clone --mirror is probably not what you want when trying to mirror a Gerrit hosted repository. They typically have many thousands of custom refs under refs/changes which are Gerrit's way of managing automatically managed review branches. If you are mirroring to Gitlab this data is useless since Gitlab doesn't know about their semantics.

The easiest way to solve this is probably a script which mirrors each of the repositories you are interested in.
Or use Gitlab mirroring [1].

Submodules are a way to mount a version of a repository as a submodule into the working tree of another git repository.

Next time ask either on the tools (git) own mailing list, on a general git discussion list, or on the support list of the
git service you are using.

[1] https://docs.gitlab.com/ee/workflow/repository_mirroring.html
Re: Mirroring Eclipse Repository with Sub Modules [message #1807255 is a reply to message #1807254] Sun, 26 May 2019 17:13 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1105
Registered: July 2009
Senior Member
git submodule --foreach [2] could be handy in such a script

[2] https://git-scm.com/docs/git-submodule/#Documentation/git-submodule.txt-foreach--recursiveltcommandgt
Re: Mirroring Eclipse Repository with Sub Modules [message #1807355 is a reply to message #1807255] Tue, 28 May 2019 12:28 Go to previous message
Bipin Banathur is currently offline Bipin BanathurFriend
Messages: 3
Registered: May 2019
Junior Member
Thanks Matthias , I guess it worked now..!!
I will take care next time.
Previous Topic:Configuration of RGit from Centos
Next Topic:What else can cause "[lock failed]" besides branches that are dups except for case?
Goto Forum:
  


Current Time: Sat Dec 07 01:45:20 GMT 2019

Powered by FUDForum. Page generated in 0.01859 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top