首先使用的是当前./ssh/id_rsa.pub
所以拷过去的名字要和这个一致
adduser --system --shell /bin/bash --gecos 'git version control' --group --disabled-password --home /home/git git
su git
git clone git://github.com/sitaramc/gitolite
mkdir bin
gitolite/install -to /home/gitolite/bin
/home/gitolite/bin/gitolite setup -pk /tmp/shen_feng_dell.pub
Host gitbox
User gitolite
Hostname 66.175.220.39
Port 22
IdentityFile ~/.ssh/gitolite
可以使用这个代替主机名 在~/.ssh/config中添加
git clone
@admin = phil
@staff = phil
repo gitolite-admin
RW+ = gitolite @admin
repo testing
RW+ = @all
repo bigfastblog
RW+ = phil @admin
R = @staff
添加远程仓库
git remote add origin(本地仓库名) git@10.2.68.95:ffmpeg 后面这部分必须和conf里边保持一致
git push origin master
例如
repo gitolite-admin
RW+ = shen_feng_dell
RW+ = shen_feng_inspiron
repo testing
RW+ = @all
repo tinyalsa
RW+ = shen_feng_dell
RW+ = shen_feng_inspiron
repo vlc
RW+ = shen_feng_dell
RW+ = shen_feng_inspiron
repo repo/panda
RW+ = shen_feng_dell
RW+ = shen_feng_inspiron --------这个对应的.config里边写的是git@10.2.68.95:repo/panda
repo ffmpeg
RW+ = shen_feng_dell
RW+ = shen_feng_inspiron
repo busybox
RW+ = shen_feng_dell
RW+ = shen_feng_inspiron
repo test/test
RW+ = shen_feng_dell
RW+ = shen_feng_inspiron
阅读(2815) | 评论(0) | 转发(0) |