Question

J'ai une configuration du système avec git et gitolite. Tout fonctionne bien, sauf que je veux que ma structure comme ceci:

Environnement local -> Serveur de développement -> Serveur de production

J'ai une configuration de prise en pension sur le serveur dev, et il est cloné avec succès jusqu'à l'environnement local. Maintenant, ce que je besoin est un système de fichiers local copie de travail sur le serveur de développement, mais je ne suis pas sûr de savoir comment faire avec gitolite.

git clone /home/gitolote/repositories/myrepo.git

fonctionne très bien jusqu'à ce que j'essaie de pousser / tirer, à quel point je reçois ceci:

remote: ENV GL_RC not set
remote: BEGIN failed--compilation aborted at hooks/update line 20.
remote: error: hook declined to update refs/heads/master

Toutes les idées sur la façon de le faire avec gitolite?

Était-ce utile?

La solution

You are using the local protocol for your clone, which means you are bypassing gitolite entirely (the gitolite script is called through a ssh forced command).

You should make a second clone on your development server, using a gitolite compatible address like:

git clone git@gitoliteserver:myrepo.git

That second repo would be able to push/pull to/from the gitolite server, while providing the "local filesystem working copy" on the development server you are after.

Autres conseils

If you require using the local protocol, all you need is to set GL_BYPASS_UPDATE_HOOK environment variable to 1:

gorgo@somegitoliteserver:~/testing$ GL_BYPASS_UPDATE_HOOK=1 git push
Counting objects: 3, done.
Delta compression using up to 3 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 234 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
To file:///home/gitolite/repositories/testing.git/
96be337..ab5ca6d  master -> master
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top