git daemon to install and use
System: Cent OS 8
Installation git and git daemon (different systems have different installation command)
yum install -y git
yum install -y git-daemon
git daeom not git command, git daemon to provide users with the TCP protocol, default port 9418
We use / var / lib / git directory as a test, in fact, after installing git deamon, this directory is automatically created, of course, we can also use other paths
git daemon reference links: https://git-scm.com/book/en/v1/Git-on-the-Server-Git-Daemon
Established in / var / lib / git git remote in a warehouse:
Reference Links: https://www.cnblogs.com/ibingshan/p/10006946.html
Start git daemon service
git daemon --verbose --export-all --base-path=/var/lib/git /var/lib/git
Then the port will enter the interactive display mode:
[2349] Ready to rumble
Then use git to clone agreement on a single client computer
git clone git://<server-ip or hostName>/test.git
We do not need to be seen given the full path /var/lib/git/test.git
This time it will show some information connected client on a terminal server, we can be judged based on whether the information is read successfully:
[2349] Ready to rumble
[2359] Connection from xxx.xxx.xxx.xxx:0000
[2359] Extended attribute "host": xxxxx
[2359] Request upload-pack for '/test.git'
[2349] [2359] Disconnected
ctrl + c end git damon
Set git daemon startup
Reference Links: https://www.cnblogs.com/ibingshan/p/11752148.html