Adrian
Adrian

Reputation: 3711

Why git clone fails for some repository names?

I just migrated with git-lfs a clone of my existing repository from the local directory /mnt/1TB/DataWin_to_sync/GITRepoWin/ubuntu18-config.git but without pushing (the push failed in fact).

Then I created a new git repository in another directory (/home/adr/GITRepoUbuntu/ubuntu18-config.git) and tried to clone it:

git clone https://adrhc.go.ro/ubuntu18-config.git
Cloning into 'ubuntu18-config'...
fatal: repository 'https://adrhc.go.ro/ubuntu18-config.git/' not found

All directories in /home/adr/GITRepoUbuntu are exposed to https://adrhc.go.ro/<<directory>>.git by using gitweb + nginx.

But when I created the new git repository /home/adr/GITRepoUbuntu/xubuntu18-config.git and clone it:

git clone https://adrhc.go.ro/xubuntu18-config.git
Cloning into 'xubuntu18-config'...
warning: You appear to have cloned an empty repository.

My nginx logs this:

2020/09/28 13:38:11 [error] 26114#0: *120 open() "/fast-disk/apache-htdocs/ubuntu_packages/info/refs" failed (2: No such file or directory), client: 127.0.0.1, server: adrhc.go.ro, request: "GET /ubuntu_packages/info/refs?service=git-upload-pack HTTP/1.1", host: "adrhc.go.ro"

Both find /mnt/1TB/DataWin_to_sync/GITRepoWin -name ubuntu_packages and locate ubuntu_packages/info/refs finds nothing on my HDDs.

Same fail I have for names:

but no error (when cloning) for the names:

What is the issue and how should I solve it?

Upvotes: 0

Views: 98

Answers (1)

Adrian
Adrian

Reputation: 3711

I found the issue; is a rewrite in my nginx configuration:

nginx_rewrites.conf:31:rewrite  ^/ubuntu[^/]*(/.*)?$        /ubuntu_packages$1          permanent

Upvotes: 0

Related Questions