git problem
Added by Jay Deiman over 14 years ago
Hello all,
First, I'm brand new to ruby and rails. I managed to get redmine up and running with apache 2.2 on a FreeBSD machine. Everything is installed from the most recent ports (redmine 0.9.2, ruby 1.8.7). I'm using a fastcgi setup in Apache and everything works just fine, except the version control "Repository" stuff.
I've tried using git first and foremost (and if that's all I can get working, I'm happy) and I've had no success with getting it working. First, here are the errors I get:
When I try to load the page: "The entry or revision was not found in the repository."
In the redmine/log/production.log file:
"Processing RepositoriesController#show (for 209.180.20.178 at 2010-03-02 21:44:5
1) [GET]
Parameters: {"action"=>"show", "id"=>"pydomrbl", "controller"=>"repositories"}
Rendering template within layouts/base
Completed in 111ms (View: 28, DB: 7) | 500 Internal Server Error [http://project
s.oss.uswest.net/projects/pydomrbl/repository]"
During my searching online for an answer to this, I found that I'm supposed to run:
ruby script/runner "Repository.fetch_changesets" -e production
I did this and it seemed to complete just fine. I also found where people were having some issues with the git binary not being in the PATH so I modified redmine/lib/redmine/scm/adapters/git_adapter.rb and changed:
GIT_BIN = "git"
to
GIT_BIN = "/usr/local/bin/git"
Nothing I have done has actually changed the errors I've been receiving and I'm pretty much at a dead end here.
Any help would be appreciated.
Thanks,
Jay Deiman
Replies (5)
RE: git problem
-
Added by Felix Schäfer over 14 years ago
Make sure the repository you are pointing to is a local bare repository, that's the only type supported at the moment.
RE: git problem
-
Added by Jay Deiman over 14 years ago
Yeah, it is. It's actually a repository I've been using remotely via webdav.
If I was a ruby programmer, I would start adding some debug code to this, but ruby is currently a hole in my knowledge array at the moment. Any suggestions on some debugging I can do?
RE: git problem
-
Added by Felix Schäfer over 14 years ago
There is no debugging possible per se, you need a local bare clone, end of discussion (currently at least, but I'm not aware of any plans to change that in the near future). If you have better access than webdav (i.e. to the hooks of the repo), you could trigger a clone on the "redmine" clone when the "master" repo is updated, else you'll have to apply a git pull
to the "redmine" clone through a cron-job.
RE: git problem
-
Added by Jay Deiman over 14 years ago
First of all, thanks for taking the time to help with this Felix.
Here is what I just did (all done on the same machine redmine is running on):
cd /home/jdeiman/proj_sandbox
git clone --bare https://domain.com/myproject.git
Opened up redmine -> my project -> settings -> Repository
Chose "git" in the dropdown and entered "/home/jdeiman/proj_sandbox/myproject.git"
I went to the Repository listing under my project and saw the same errors.
I ran "ruby script/runner "Repository.fetch_changesets" -e production" in /usr/local/www/redmine with no errors.
I went to the Repository listing under my project again and I still see the same errors.
Thanks,
Jay Deiman
RE: git problem
-
Added by Felix Schäfer over 14 years ago
Mmh, make sure the "redmine" user can access the repository (permissions-wise)?