CentOS 7
Sponsored Link

Gitolite3 : リポジトリを登録する
2015/07/21
 
Gitolite にリポジトリを新規登録します。
[1] 例として public-repo リポジトリを登録します。作業は Gitolite 管理者で実施します。
-sh-4.2$
vi ~/gitolite-admin/conf/gitolite.conf
# 最終行に追記

repo public-repo
    RW+     =   @all

-sh-4.2$
cd ~/gitolite-admin

-sh-4.2$
git commit -a -m "Add public-repo repository"

[master 5aebeb2] Add public-repo repository
1 file changed, 4 insertions(+)
-sh-4.2$
git push

Enter passphrase for key '/var/lib/gitolite3/.ssh/gitadmin':
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 391 bytes | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: Initialized empty Git repository in /var/lib/gitolite3/repositories/public-repo.git/
To ssh://GitServer/gitolite-admin
  8d46625..5aebeb2 master -> master
[2] 任意のユーザーで新規登録したリポジトリがクローンできるか確認しておきます。
# 現在アクセス可能なリポジトリ一覧表示

[cent@dlp ~]$
ssh GitServer

PTY allocation request failed on channel 0
hello id_cent, this is gitolite3@dlp running gitolite3 3.6.3-1.el7 on git 1.8.3.1

 R W    public-repo
 R W    testing
Connection to 10.0.0.30 closed.

[cent@dlp ~]$
git clone ssh://GitServer/public-repo

Cloning into 'public-repo'...
warning: You appear to have cloned an empty repository.
[cent@dlp ~]$
total 0
drwxrwxr-x 3 cent cent 17 Jul 21 21:06 public-repo
drwxrwxr-x 3 cent cent 17 Jul 21 20:50 testing
 
Tweet