Git Administration

...of broken gitolite-admin

This was my second trip down the path of gl-dont-panic. May I just add that without this utility (really more of a read-me), there's no way I'd administrate Git with gitolite-admin 'cause it would be futile to try.

When sitaram speaks of "admin key", he's really referring to the RSA public key belonging to the admin who's in the broken state described by my article (linked below). In my case, this was ME!

May I point out that it appears that gl-dont-panic has changed a little since the last time I outlined its use. For step #4 in Sorting out gitolite-admin troubles..., I did the following after invoking gl-dont-panic on the server in the subdirectory in which I had cloned gitolite-admin. These are the steps outline in sitaram's don't panic script.

Step 1: prepare

  1. Created a new keypair on my workstation.
  2. Copied the public part to af-blackpearl.site:/home/russ/.ssh.
  3. Copied that to /home/git/last-resort/gitolite-admin/keydir.
  4. Renamed it to [email protected].

Step 2: use one of the fixes below (on the server)
- (FIX #2: PUSHING A NEW ADMIN KEY)

  1. $ gl-dont-panic /home/git/last-resort/gitolite-admin/keydir/[email protected]:
git@af-blackpearl:~/last-resort/gitolite-admin$ gl-dont-panic /home/git/last-resort/gitolite-admin/keydir/[email protected] Cloning into /tmp/tmp.Cjuz4xsw5f... done. [master b829aa6] emergency add/update russ@main key (from /home/git/last-resort/gitolite-admin/keydir/[email protected]) 1 files changed, 1 insertions(+), 1 deletions(-) rewrite keydir/[email protected] (100%) Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 752 bytes, done. Total 4 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (4/4), done. To /home/git/repositories/gitolite-admin.git 5443d96..b829aa6 master -> master

Step 3: completing the fix (on your workstation)

  1. Did a git pull not on a fresh gitolite admin clone, but in my original gitolite-admin project:
    master ~/blackpearl/gitolite-admin $ git pull origin master remote: Counting objects: 7, done. remote: Compressing objects: 100% (4/4), done. remote: Total 4 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (4/4), done. From af-blackpearl.site:gitolite-admin * branch master -> FETCH_HEAD Auto-merging keydir/[email protected] CONFLICT (content): Merge conflict in keydir/[email protected] Automatic merge failed; fix conflicts and then commit the result.
  2. (The "merge failed" message isn't important; it's just from the "in between" and broken stage at which I left it.

    What did I do to fix this so that everything was back to normal?

    I removed [email protected], copied over fresh one from /home/russ/.ssh where I'd created the new one, and renamed it appropriately. Then I did git add [email protected], commited it, pushed it out to origin master and there I was.