Regenerating Cancelled Keys
Created by: cboden
Gitlab is either storing deleted keys or not properly deleting keys from gitolite when they're removed from Gitlab. When an action is taken in Gitlab that invokes gitolite the delete keys are restored (and thus causing permission errors when user's try to interact with their remotes).
To fix this issue I check three places:
- ~git/.ssh/authorized_keys - I manually delete the cancelled keys
- ~git/.gitolite/keysdir/ - I manually remove the cancelled keys' files
- I check /path/to/gitlabhq/db/production.sqlite3 - The deleted keys are not in here
- I run the gitolite post-update hook
These steps fix the permission error, until Gitlab invokes gitolite, they old keys are restored and users then have permission errors again (and I repeat those 4 steps).