changing gitolite username/home directory

5 views
Skip to first unread message

Matt Zagrabelny

unread,
May 18, 2026, 9:09:08 PMMay 18
to gito...@googlegroups.com
Greetings,

I am attempting to change the gitolite username and corresponding home directory of said user and am hitting a snag...

From: gitolite,/var/lib/gitolite
To: git,/var/lib/git

I copy over all the files:

# cp -rp /var/lib/gitolite/{.*,*} /var/lib/git

and change ownership:

# chown -R git:git /var/lib/git/{.*,*}

I fail to be able to clone a repo through the new username/home dir:

$ git clone git@gitolite-server:foo-repo
Cloning into 'foo-repo'...
FATAL: R any foo-repo user-bar DENIED by fallthru
(or you mis-spelled the reponame)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

...but the old username/home dir still work - as expected:

$ git clone gitolite@gitolite-server:foo-repo
Cloning into 'foo-repo'...
remote: Enumerating objects: 306, done.
remote: Counting objects: 100% (306/306), done.
remote: Compressing objects: 100% (300/300), done.
remote: Total 306 (delta 146), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (306/306), 52.52 KiB | 7.50 MiB/s, done.
Resolving deltas: 100% (146/146), done.

This is the only log messages I see:
2026-05-18.14:18:53     89263   ssh     ARGV=user-bar   SOC=git-upload-pack 'foo-repo'      FROM=10.0.0.10
2026-05-18.14:18:53     89263   die     R any foo-repo user-bar DENIED by fallthru<<newline>>(or you mis-spelled the reponame)

Have others attempted this sort of change and have any tips or where to look for debugging information?

Thanks,

-m

Sitaram Chamarty

unread,
May 18, 2026, 10:15:37 PMMay 18
to Matt Zagrabelny, gito...@googlegroups.com
On Mon, May 18, 2026 at 03:31:59PM -0400, 'Matt Zagrabelny' via gitolite wrote:
> Greetings,
>
> I am attempting to change the gitolite username and corresponding home
> directory of said user and am hitting a snag...
>
> From: gitolite,/var/lib/gitolite
> To: git,/var/lib/git
>
> I copy over all the files:
>
> # cp -rp /var/lib/gitolite/{.*,*} /var/lib/git
>
> and change ownership:
>
> # chown -R git:git /var/lib/git/{.*,*}
>
> I fail to be able to clone a repo through the new username/home dir:
>
> $ git clone git@gitolite-server:foo-repo
> Cloning into 'foo-repo'...
> FATAL: R any foo-repo user-bar DENIED by fallthru
> (or you mis-spelled the reponame)
> fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.
>

First, try `gitolite setup` on the server. It should fix things
up.

But I honestly think for maximum safety you should follow
https://gitolite.com/gitolite/install.html?h=server#moving-servers
-- even if it is the same server.

sitaram

Matt Zagrabelny

unread,
May 22, 2026, 11:54:01 AMMay 22
to Sitaram Chamarty, gito...@googlegroups.com
Hi Sitaram,

Thanks for the response!

gitolite setup was the ticket. Thank you!

Here are the steps I took for future mailing list readers:

# cp -rp /var/lib/gitolite/{.*,*} /var/lib/git
# chown -R git:git /var/lib/git/{.*,*}
# su - git
$ gitolite setup

Cheers,

-m
Reply all
Reply to author
Forward
0 new messages