Unable to create folder /gitolite

I have an existing Gitolite install on the same server as my ActiveCollab instance. When I attempt to configure the AC Gitolite module, I provide the git user name, and the domain name. I have already pre-configured Gitolite's admin users and such. However, the gitolite admin path is set to "/gitolite/gitolite-admin/", and I am unable to change it. Further, when I tell the module to "test connection", I receive the error message "Unable to create foler /gitolite/".

I have looked through the setup script that comes with the package, and have already performed the steps that it would have done automatically (install Gitolite, add admin key, configure admin repo, etc...), and all that is working correctly.

@qwindelzorf Please check the permission for which user you are running. Confirm that user should have permission to run php. Another way is, you can try the setup script with different user and make sure you will run the script with sudo permission. Thanks.

I managed to solve this problem by symlinking the folder that the setup screen wanted (/gitolite/gitolite-admin/) to a checkout of the gitolite-admin repo in the web-user's home directory. I would suggest that this field be made user configurable in the future, since not all users of this extension will necessarily have the privileges necessary to create root-level folders.

I guess there is some confusion.

gitolite module doesn't require /gitolite/gitolite-admin/ in / (root dir).

Module expect it to be present at /work/git/gitolite/gitolite-admin under activeCoallb web-root (DocumentRoot in apahce)

May I ask if instructions were not clear OR are we missing something here?

The instructions seemed reasonably clear. The initial install (extract into custom/modules) worked, activation in ActiveCollab worked. The place things went wrong was when setting up the module to work with my preexisting Gitolite instance. Because I already had Gitolite installed and running, I did not run the provided setup script. Instead, I went through the script manually and verified that each of the steps indicated had been completed. Essentially, I was doing what very much resembles a "remote server" setup, but not actually on a remote server.

Somehow, during this process, nothing triggered whatever was necessary to inform the module where the gitolite-admin repo was. As a result, it was left defaulting to /gitolite/gitolite-admin, which was problematic because that location did not exist.

Now, as a further wrinkle, since I have gotten it all set up and working, the "Gitolite Admin Path" has changed to reflect what it probably should have been from the beginning, namely $AC_BASE/work/git/gitolite/gitolite-admin/. So I am further confused. Further, if I move the gitolite-admin repo there, and attempt to reconfigure the module, I get "Unable to connect to server".

I acknowledge that ac_gitolite module is bit tough to configure with existing gitolite setup. We are working on different use-cases and it will be addressed in next release.

Now, reason we hardcoded gitolite-admin path is that many users attempted to use gitolite-admin path present in gitolite's repositories. For example, /home/git/repositories/gitolite-admin.

Problem with this "inside-gitolite" path is that copy of gitolite-admin is in "unpacked" format (data that we see in hidden .git folder").

So a user need to "clone" gitolite-admin somewhere else on activecollab server. Also the cloning need to be done via PHP user and not by shell user (unless shell user is same user who run's PHP processes).

We thought by asking user to clone gitolite-admin under /path/to/activecollab/work/git/gitolite/gitolite-admin folder we will run least into permission issues and will be able to provide better support.

We are working on new setup wizard which will streamline setup process and will interactively guide user about possible problems and workarounds.

Coming back to your problem, have you run git clone from the same system user who run PHP process?

I have it working. The problem I appear to have encountered is that nowhere in the setup instructions does it mention the need to clone the gitolite-admin repo to that specific directory. I got around this with the creative use of symlinks, which was not a good answer, but worked.

My recommendation would be to add something to the setup instructions indicating that the gitolite-admin repo needs to be cloned into $AC_HOME/work/git/gitolite/. The un-editable text box labeled "Gitolite Admin Path" in the config panel is somewhat inscrutable. A little "help" link with a popout explaining what is needed would go a long ways.

@qwindelzorf

Thanks for your feedback and glad to know that ac_gitolite module is working for you. :-)

We already started work on new setup wizard which will be friendlier and will have an interactive diagnostic routine.

Though in next version and in near future, we will be keeping gitolite-admin location fixed i.e. under work/git/gitolite.

This module has another feature in which it clones repos public repos (e.g. from github) in work/git folder and keep them in sync. Its like read-only repos not under control of gitolite.

work/git folder is also used when gitolite is on different machine/file-system. In that case, activeCollab need to clone every repo locally to show source-code inside activeCollab project's source tab.

Activecollab uses work/git folder as a standard location for git repos. Hence its better to stick with it (atleast for now)

Thanks again for your valuable feedback. :-)