Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7791124
  • 博文数量: 1780
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16442
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1780)

文章存档

2025年(10)

2024年(16)

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: 系统运维

2025-04-23 17:10:33

服务器
yum install git -y
useradd git
cd /opt/
git init --bare web.git
chown -R git:git web.git/
chsh git  #修改shell
/usr/bin/git-shell
mkdir -p /home/git/.ssh/
chmod 700 /home/git/.ssh
touch /home/git/.ssh/authorized_keys
chmod 600 /home/git/.ssh/authorized_keys
客户机
yum install git -y
ssh-keygen 
cat ~/.ssh/id_rsa.pub 放到服务端的/home/git/.ssh/authorized_keys中
git clone git@10.1.102.42:/opt/web.git

git clone www@10.1.102.42:/opt/web.git   #www为系统用户名,需要输入密码
阅读(9) | 评论(0) | 转发(0) |
0

上一篇:vbox .voa文件转成hyper-v .vhdx

下一篇:没有了

给主人留下些什么吧!~~