gitweb and gitolite cannot add new repo

I installed gitolite first, and added some user and some repos, everything was fine. I then added gitweb, and could see repos through apache instance (just gitweb, no gitdaemon). The problem now comes in that I cannot add new repositories any more. Every time I pushed a change of gitolite-admin conf file, there were always 2 lines shown up in the log

remote: FATAL: git config 'gitweb.description' not allowed
remote: check GIT_CONFIG_KEYS in the rc file

Despite these 2 annoying lines, the conf file is indeed changed every time. I tried to stop apache instance, but still no luck 🙁

  • Dockerhub automated builds with multiple private repos
  • GitBucket: error: Your local changes to the following files would be overwritten by merge
  • github server-side git hooks (i.e. pre-commit and post-commit)
  • How to revert a commit and create a new branch from those changes?
  • Get last changes of file with GIT
  • mirroring a self-hosted git repository to github.com (auth failures)
  • I googled and cannot find any similar match to discuss this issue. Anyone can help? Thanks a lot!

  • Does git ignore empty folders?
  • Amending a Git commit to a shared repo
  • Collaborating on Android Studio Project using git
  • Git tab completion in zsh throwing errors
  • Git - error: RPC failed; result=22, HTTP code = 401 fatal: The remote end hung up unexpectedly
  • Multiple git origins/remotes and checkout branches
  • One Solution collect form web for “gitweb and gitolite cannot add new repo”

    The Gitolite g2-g3 migration page mentions:

    Now go to your old clone, and push it:

    $ cd old.ga
    $ gitolite push -f
        ...usual git progress output deleted...
    remote: FATAL: git config foo.bar not allowed
    remote: check GIT_CONFIG_KEYS in the rc file
    To /home/git/repositories/gitolite-admin.git
     + 7eb8163...1474770 master -> master (forced update)
    

    Aaha! I forgot to set GIT_CONFIG_KEYS (new name for GL_GITCONFIG_KEYS) in the new rc file so fix that:

    $ vim ~/.gitolite.rc
    (edit and set it to `.*` for now)
    

    Make sure your .gitolite.rc does contain:

    GIT_CONFIG_KEYS             =>  '.*',
    

    (It was also mentioned in this GitLab issue, even though it wasn’t the direct root cause of the issue)


    I got another issue which is my projects.list file does not get updated automatically when I added a new repository to gitolite-admin conf.
    For gitweb, I had to manually edited that file. Did you know what could possibly cause that?

    The “interfacing with external tools” page mentions:

    The list of gitweb-readable repos is written to a file whose name is given by the rc file variable GITWEB_PROJECTS_LIST.
    The default value of this variable, if it is not specified or empty, is $HOME/projects.list.

    Make sure you have in your .gitolite.rc:

    GITWEB_PROJECTS_LIST        => '/path/to/projects.list',
    
    Git Baby is a git and github fan, let's start git clone.