Git on the Server, refer to https://www.qcloud.com/developer/labs/lab/10045
requirements
|
|
install git
|
|
change the PATH system variable
将 git 目录加入 PATH
|
|
create git user and set password
|
|
init git repositores and set user rights
创建 git 仓库并初始化
|
|
If follow the steps above, the location will be /usr/local/git/bin/git-shell, use which git-shell command to check the location
安全目的, 限制 git 账号的 ssh 连接只能是登录 git-shell
use git service
|
|
恭喜,Git 服务器搭建完成
Further reading: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols