download files from remote server using git protocol

154 views Asked by At

is it possible to download files from a remote server running git-daemon?

or how to download files from git:// server like downloading files using curl from http:// server?

the server is running this command:

/usr/bin/git daemon --reuseaddr --port=1234 --base-path=/home/user1/ --export-all
1

There are 1 answers

2
torek On

You can download objects, using the Git protocol. Objects are not files: some objects are commit objects, some objects are tree objects, and some objects are blob objects, and if you put all three of these together into a database, you can use that to extract files. But once you write code to do this, you're implementing git clone or—best case—git archive, so why not use those directly?