ubuntu - git远程库
我想大声告诉你
我想大声告诉你 2017-04-26 09:01:44
0
1
732

(ubuntu环境)请问,我在本地有一个目录(非空),想把它变成git远程库,应该要怎么做?
PS:本人是git库管理者,要给其他人分配库的权限,在网上看了一些教程,不太明白。
有一种比较笨的方法:先在gitolite-admin/conf/gitolite.conf里创建库并分配权限,然后push到服务器,再下载到本地,把文件拷进去,然后push到服务器。这方法不太好用,有其他方法吗?

我想大声告诉你
我想大声告诉你

reply all(1)
漂亮男人

It’s not difficult if you just turn it into a remote library. All four transmission protocols supported by Git can be used:

  1. 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.
  2. 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.
  3. 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.
  4. 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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template