Gitolite3 : Add Repositories2015/07/21 |
Add New Repository in Gitolite.
|
|
[1] | For example, add a new repository "public-repo". Work with Gitolite admin user. |
-sh-4.2$
vi ~/gitolite-admin/conf/gitolite.conf # add to the end repo public-repo RW+ = @all 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] | Make sure a user can clone the repository just added. |
# show the list of repositories he can access [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 |
Sponsored Link |
|