It’s not difficult if you just turn it into a remote library. All four transmission protocols supported by Git can be used:
file:// This is suitable for local (LAN file sharing system). It’s simple and can be used immediately, but it’s impossible to divide permissions.
git:// It is not difficult to run a special daemon process and then allow others to access it through a specific port number. However, it is generally only used for reading. Once the write operation is opened, all users who know the address can read/write, and there is basically no security.
ssh:// This is more commonly used, and of course the most secure. By establishing an authorization layer on top of ssh, very complex permission distribution can be achieved, representing programs: gitolite, etc. However, the configuration is very complicated and requires you to have a very in-depth understanding of the ssh protocol. Another disadvantage of ssh is that it cannot achieve anonymous access - of course this is okay if you don't need open source. Or use it with the git protocol.
http(s):// 架设简便,整一个 http 服务器,把 git repo 放在服务器根路径,然后配置一个 post-update Just hook. Advanced Git services are all http(s) + ssh two-pronged (http is slower), such as Github. It is recommended that you try Gitlab if you have the conditions, but it requires the ability to deploy Rails, and it is quite complicated (the effect is amazing).
A brief introduction. Each specific operation process is difficult to explain clearly in a few words. Think about what to use first, and then start from here
It’s not difficult if you just turn it into a remote library. All four transmission protocols supported by Git can be used:
file://
This is suitable for local (LAN file sharing system). It’s simple and can be used immediately, but it’s impossible to divide permissions.git://
It is not difficult to run a special daemon process and then allow others to access it through a specific port number. However, it is generally only used for reading. Once the write operation is opened, all users who know the address can read/write, and there is basically no security.ssh://
This is more commonly used, and of course the most secure. By establishing an authorization layer on top of ssh, very complex permission distribution can be achieved, representing programs: gitolite, etc. However, the configuration is very complicated and requires you to have a very in-depth understanding of the ssh protocol. Another disadvantage of ssh is that it cannot achieve anonymous access - of course this is okay if you don't need open source. Or use it with the git protocol.http(s)://
架设简便,整一个 http 服务器,把 git repo 放在服务器根路径,然后配置一个post-update
Just hook. Advanced Git services are all http(s) + ssh two-pronged (http is slower), such as Github. It is recommended that you try Gitlab if you have the conditions, but it requires the ability to deploy Rails, and it is quite complicated (the effect is amazing).A brief introduction. Each specific operation process is difficult to explain clearly in a few words. Think about what to use first, and then start from here