gitolite修复authorized_keys丢失以及仓库损坏

本文档详细介绍了Gitolite的基本配置与使用方法,包括初始化设置、子命令的使用及常见警告说明等内容。适用于初次安装及后续维护Gitolite的用户。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

gitolite  修复

$ gitolite setup -pk git.pub     

Initialized empty Git repository in /home/git/repositories/xxx.git/
WARNING: /home/git/.ssh/authorized_keys missing; creating a new one

    (this is normal on a brand new install)


$ gitolite -h
Usage:  gitolite [sub-command] [options]
The following built-in subcommands are available; they should all respond to
'-h' if you want further details on each:
    setup                       1st run: initial setup; all runs: hook fixups
    compile                     compile gitolite.conf
    query-rc                    get values of rc variables
    list-groups                 list all group names in conf
    list-users                  list all users/user groups in conf
    list-repos                  list all repos/repo groups in conf
    list-phy-repos              list all repos actually on disk
    list-memberships            list all groups a name is a member of
    list-members                list all members of a group

Warnings:
  - list-users is disk bound and could take a while on sites with 1000s of repos
  - list-memberships does not check if the name is known; unknown names come
    back with 2 answers: the name itself and '@all'

In addition, running 'gitolite help' should give you a list of custom commands
available.  They may or may not respond to '-h', depending on how they were

written.


$ gitolite setup -h
Usage:  gitolite setup [<option>]
Setup gitolite, compile conf, run the POST_COMPILE trigger (see rc file) and
propagate hooks.
    -a, --admin <name>          admin name
    -pk, --pubkey <file>        pubkey file name
    -ho, --hooks-only           skip other steps and just propagate hooks
    -m, --message               set setup commit message

First run: either the pubkey or the admin name is *required*, depending on
whether you're using ssh mode or http mode.

Subsequent runs:
  - Without options, 'gitolite setup' is a general "fix up everything" command
    (for example, if you brought in repos from outside, or someone messed
    around with the hooks, or you made an rc file change that affects access
    rules, etc.)
  - '-pk' can be used to replace the admin key; useful if you lost the admin's
    private key but do have shell access to the server.

  - '-ho' is mainly for scripting use.  Do not combine with other options.
  - '-a' is ignored
  - '-m' can be used to replace default commit message "gitolite setup $argv"
    with a custom message (e.g. "Setting up your repository mgmt").

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值