4

I recently installed gitolite on my linux server.

This server is my git remote server with some bare repositories located on a separate path. lets say

/images/git_bare_repos

By default gitolite is installed on git user in home directory. I am able to clone gitolite-admin repository from the root user on the same machine. That is gitolite is working fine.

>>>ls /home/git
bin  gitolite  projects.list  repositories  root.pub

all the new repositories are created in repositories directory:

>>>ls /home/git/repositories/
gitolite-admin.git  testing.git

My question is:

I want gitolite to create new repositories on the same path where all my other bare repositories rest. Ie. in /images/git_bare_repos

I tried adding:

GL_REPO_BASE  => "/images/git_bare_repos",

in .gitconfig.rc file but with no luck.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Vedant Aggrawal
  • 400
  • 4
  • 17
  • That variable `GL_REPO_BASE`, needs to be added to the `gitolite.rc` (under `/etc/gitolite3/gitolite.rc` on my system, or as dotfile in your home directory). I guess your `.gitconfig.rc` was just a typo... – m4110c Jul 05 '20 at 11:01

1 Answers1

1

The simplest approach would be:

  • export in your .bashrc GL_REPO_BASE to the right PATH;

Or:

  • modify the gitolite.rc before the setup step

And then:

  • re-install gitolite again, checking that it does pick up the environment variable PATH this time.

The src/lib/Gitolite/Rc.pm does mention:

# these keys could be overridden by the rc file later
$rc{GL_REPO_BASE} = "$ENV{HOME}/repositories";
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • You wrote that it is necessary to re-install gitolite. Does that apply to the first point and the second point, or just the second point? It is not clear from your answer, as you used a flat itemized list. – Jonathan Komar Sep 19 '18 at 15:01
  • 1
    @JonathanKomar It is the second step after having done one of the first two points. I have edited the answer. – VonC Sep 19 '18 at 15:08