linux centos git server 簡易搭建
阿新 • • 發佈:2019-02-14
htm which john href install .com ini ssh clas
dnf install git -y id it useradd git su git cd mkdir .ssh && chmod 700 .ssh touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys cat /tmp/id_rsa.john.pub >> ~/.ssh/authorized_keys mkdir -p /opt/git/repo.git git init --bare /opt/git/repo.git chown -R git:git /opt/git cat /etc/shells # see if `git-shell` is already in there. If not... which git-shell # make sure git-shell is installed on your system. vim /etc/shells # and add the path to git-shell from last command chsh git # and enter the path to git-shell, usually: /usr/bin/gitshell git clone git@ip:/opt/git/repo.git
https://www.cnblogs.com/dee0912/p/5815267.html
https://git-scm.com/book/zh/v2 - 服務器上的git
linux centos git server 簡易搭建