Difference between revisions of "Gitolite"
From Fixme.ch
(→Usage) |
(→Tip) |
||
Line 25: | Line 25: | ||
Host git.fixme.ch | Host git.fixme.ch | ||
Port 1337 | Port 1337 | ||
+ | == Deploy == | ||
+ | * There is a git hook to publish the applish in prod | ||
+ | * The deploy hook is located at <code>/home/git/hooks/deploy.sh</code> in the [[Internal_Server]] | ||
+ | * You must add a <code>post-receive</code> hook in your project in <code>/home/git/repositories/yourproject/hooks</code> | ||
+ | DIR=/var/www/foo/htdocs | ||
+ | APP=www-data | ||
+ | /home/git/hooks/deploy.sh $APP $DIR | ||
== See also == | == See also == | ||
* [[Git_talk]] | * [[Git_talk]] |
Revision as of 23:44, 9 January 2013
Goal
- Provides GIT repositories to the members.
- https://github.com/sitaramc/gitolite/wiki
How to
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 applish 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/home/git/repositories/yourproject/hooks
DIR=/var/www/foo/htdocs APP=www-data /home/git/hooks/deploy.sh $APP $DIR