1

Why can't i clone from a repository hosted on my network?

/home/ondre $ git clone http://10.0.8.23/example.git
Cloning into 'example'...
fatal: repository 'http://10.0.8.23/example.git/' not found

I'm using Arch Linux ARM on the server with apache as a webserver. I'm sure i have no typos in the address, because when i open it in my browser it displays the directory listing, where you can find the branches/ folder, the config file etc.

Can anybody please help?

EDIT: I just did some testing and i found out something.

Terminal 1 (as the client):

/home/ondre/test $ git clone http://localhost:8000/test.git/
Cloning into 'test'...
fatal: repository 'http://localhost:8000/test.git/' not found

Terminal 2 (as the server):

/home/ondre/test $ python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [25/Jul/2022 20:26:06] code 404, message File not found
127.0.0.1 - - [25/Jul/2022 20:26:06] "GET /test.git/info/refs?service=git-upload-pack HTTP/1.1" 404 -

It's probably trying to get a info/refs file that doesn't exist.

1 Answers1

0

I found the solution! You need to cd into/the/repository.git and run git update-server-info on the server.