[tor-bugs] #6111 [Internal Services/Service - git]: Make git.../user/username/reponame.git work for all user repositories

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Aug 28 12:23:10 UTC 2018


#6111: Make git.../user/username/reponame.git work for all user repositories
---------------------------------------------+----------------------------
 Reporter:  nickm                            |          Owner:  tor-gitadm
     Type:  task                             |         Status:  assigned
 Priority:  Medium                           |      Milestone:
Component:  Internal Services/Service - git  |        Version:
 Severity:  Normal                           |     Resolution:
 Keywords:  git                              |  Actual Points:
Parent ID:                                   |         Points:
 Reviewer:                                   |        Sponsor:
---------------------------------------------+----------------------------
Changes (by irl):

 * cc: arma, atagar, boklm, chiiph, chrisd, erinn, hoganrobert, kaner,
 karsten, linus, mikeperry, n8fr8, nickm, nima, pde, rransom, runa, schoen,
 sebastian, sjm217, tomb (added)


Comment:

 (If you have been added to CC on this ticket, it is because you have
 repositories that would be affected by this change! If you no longer use
 these repositories,
 [[https://trac.torproject.org/projects/tor/newticket?summary=Please%20move%20my%20git%20repositories%20to%20the%20attic&component=Internal%20Services/Service%20-%20git&type=task|please
 let us know and we can move them to the attic]].)

 There are a few options for tackling this ticket.

 [[http://techblog.adrianlowdon.co.uk/2013/07/22/renaming-a-git-repository-
 under-gitolite-keeping-an-alias-for-the-old-name/|This blog post]] has
 some ideas about what we want to do. In gitolite3 there is an additional
 file in the `.git` folder of every repository that would need to be
 updated.

 == URLs to change ==

 There are three places (actually more than this if you count onion
 addresses) where URLs exist:

 ==== Developer git URLs ====

 `ssh://git@git-rw.torproject.org/...`

 These exist on `cupani` in `/srv/git.torproject.org/repositories`. They
 are served by gitolite on this host via SSH. There is a hook in
 `/srv/git.torproject.org/git-helpers/` named `00-sync-to-mirror` that will
 copy repositories to `vineale`. If repositories are removed from `cupani`,
 they will still remain on `vineale` and would need to be manually cleaned
 up.

 ==== Anonymous git URLs ====

 `https://git.torproject.org/...`

 These are served by Apache in `vineale`. Configuration for Apache is in
 puppet. The repositories themselves would be sorted when the above are
 sorted, but after manual cleanup there would be no redirect and this would
 have to go in the Apache config.

 ==== Anonymous gitweb URLs ====

 `https://gitweb.torproject.org/...`

 This is the same as above really.

 == Option 1: Just break stuff ==

 This is the easiest of all the options. It would mean all old URLs for
 these repositories break including git-rw, git and gitweb.

 1. Move the repositories on cupani into the user/ directory
 2. Update the gitolite config
 3. Clean up the old repositories at their old locations on vineale

 == Option 2: Keep developer URLs working ==

 As option 1, but additionally:

 4. Edit `/srv/git.torproject.org/etc/gitolite.rc` and enable
 'Alias::input'
 5. Add a new `REPO_ALIASES` variable to the file with mapping of
 repositories

 (Note: this would also require that we upgrade gitolite on this host as
 the version it is running is too old to support this feature!)

 == Option 3: Keep anonymous URLs working ==

 As option 1, but additionally:

 4. Add HTTP redirects to the Apache configs for `vineale` to redirect the
 old URLs to new ones

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6111#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list