Gitolite access repair

*爱你&永不变心* 提交于 2019-12-04 05:15:41
Chris Johnsen

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 user
  • cd /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 user
  • copy your new public key to /tmp/username.pub
    username.pub should be the same as a filename that is currently in your keydir/; you can list the contents of the existing keydir/ with

    GIT_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

The answer above was helpful. But for gitolite 3.04 (and probably later) use gitolite push instead of gl-admin-push.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!