Difference between revisions of "Gitolite"

From Fixme.ch
Jump to: navigation, search
(Deploy)
(How to)
Line 6: Line 6:
 
== How to ==
 
== How to ==
 
* Ask The following people to access the gitolite admin :
 
* Ask The following people to access the gitolite admin :
** [[User:gcmalloc|gcmalloc]]
+
        RW    =  nemen
** [[User:Nemen|Nemen]]
+
        RW    =  malik
** [[User:Rorist|Rorist]]
+
        RW    =  rorist
** [[User:Francois|Francois]]
+
        RW    =  francois
 +
        RW    =  anael
 +
        RW    =  crazygolem
 +
        RW    =  prosouth
 +
        RW    =  artphi
  
 
== Usage ==
 
== Usage ==

Revision as of 09:30, 7 May 2013

Goal

How to

  • Ask The following people to access the gitolite admin :
       RW     =   nemen
       RW     =   malik
       RW     =   rorist
       RW     =   francois
       RW     =   anael
       RW     =   crazygolem
       RW     =   prosouth
       RW     =   artphi

Usage

  • Gitolite admin: edit and push to this repository
 git clone ssh://gitolite@git.fixme.ch:1337/gitolite-admin

Keep the file as clean as you left it.

  • Access repository like this:
 git clone ssh://gitolite@git.fixme.ch:1337/$example
  • List repositories you can access
 ssh gitolite@foo.fixme.ch -p 1337

Tip

If you don't want to specify the port every time you use ssh/git, you can add the host to your ~/.ssh/config:

 Host git.fixme.ch
     Port 1337

Deploy

  • There is a git hook to publish the application in prod
  • The deploy hook is located at /home/git/hooks/deploy.sh in the Internal_Server
  • You must add a post-receive hook in your project in a file /home/git/repositories/yourproject/hooks/post-receive with the following content:
DIR=/where/your/project/should/be/deployed #example: /var/www/foo/htdocs
APP=user-to-chown-to #example: www-data
/home/git/hooks/deploy.sh $APP $DIR

See also