码迷,mamicode.com
首页 > 其他好文 > 详细

服务器上搭建使用SSH账户登录的Git仓库

时间:2017-11-29 22:45:46      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:输入   epo   保存   init   mkdir   sha   str   shared   域名   

1、安装git

yum install -y git

2、创建git仓库保存的目录

mkdir /data/git_repo

3、初始化空仓库

cd /data/git_repo
git init --bare --shared example.git

4、客户端使用SSH账户访问服务器仓库

git clone ssh://[ssh账户名]@[服务器域名或IP]/data/git_repo/example.git

然后要求输入[ssh账户名]对应的密码,输入正确的密码即可访问仓库

服务器上搭建使用SSH账户登录的Git仓库

标签:输入   epo   保存   init   mkdir   sha   str   shared   域名   

原文地址:http://www.cnblogs.com/liuzhenwei/p/7922928.html

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