I have set up gitolite on my linux server and added my laptop to the gitolite-admin repository. I was forced to format my laptop (bad hard drive) so I need to figure out a way to regain access to my other repositories gitolite controls. It's worth mentioning, I have root access on my linux server, if that helps. I am not very proficient with SSH/public keys, etc, so if someone can help, I would greatly appreciate it.
Asked
Active
Viewed 3,025 times
2 Answers
11
If you have version 2.0.3 or later installed, you can use the gl-admin-push
command to push from a local clone of the admin repository:
See gl-admin-push: bypassing gitolite for the gitolite-admin repo :
su
to your Gitolite usercd /tmp && git clone ~/repositories/gitolite-admin.git
- replace your old public key in
keydir/
with your new one, then commit ~/.gitolite/src/gl-admin-push
to push it; this will update the user’s.ssh/authorized_keys
to integrate your new key
If you are using something earlier than 2.0.3, you can use the gl-dont-panic
command to replace a key:
su
to your Gitolite usercopy your new public key to
/tmp/username.pub
username.pub
should be the same as a filename that is currently in yourkeydir/
; you can list the contents of the existingkeydir/
withGIT_DIR="$HOME"/repositories/gitolite-admin.git git ls-tree master:keydir
run
cd /tmp && ~/.gitolite/src/gl-dont-panic username.pub
to install the replacement key

Sean Lynch
- 2,852
- 4
- 32
- 46

Chris Johnsen
- 214,407
- 26
- 209
- 186
5
The answer above was helpful. But for gitolite 3.04 (and probably later) use gitolite push instead of gl-admin-push.

fries
- 216
- 3
- 4
-
Works perfectly! I was able to fix my broken account :) I exactly used: `~/gitolite/src/gitolite push` – boryn Aug 29 '14 at 08:20