Git configured to be private allows to make an anonymous git clone


I have configured the git module in Virtualmin.
I have created a repository repo and selected No for anonymous access to have my repo private in virtualmin.
I create 2 users user1 with access and user2 without access to the repo, in virtualmin.

If I access it by a browser, I have a login request. All is ok.

I use git clone on another machine.
I use the following command:
git clone HTTP(S)://user1:pwd1@mydomain/git/repo.git
It’s working.
the (s) is because I make both tests in HTTP and HTTPS.

I use the following command:
git clone HTTP(s)://user2:pwd2@mydomain/git/repo.git
It’s rejected. Cool, it’s correct. user2 doesn’t have access.

Then, I use the following command, to check anonymous access:
git clone HTTP(s)://mydomain/git/repo.git
It’s working. Not good.

This is my problem. This means my repo is not private.
I test on another terminal to be sure any previous login was not memorized.

Have a great day,


OS type and version: Ubuntu Linux 20.04.3
Webmin version: 1.984
Virtualmin version: 6.17
Related products version: git version 2.25.1

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.