码迷,mamicode.com
首页 > 系统相关 > 详细

linux centos git server 简易搭建

时间:2019-02-14 13:35:15      阅读:230      评论:0      收藏:0      [点我收藏+]

标签:https   centos   tps   you   clone   htm   href   amp   .com   

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 简易搭建

标签:https   centos   tps   you   clone   htm   href   amp   .com   

原文地址:https://www.cnblogs.com/wswind/p/10373881.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!