kubitron / redmine_git_hosting

A ChiliProject/Redmine plugin which makes configuring your own git hosting easy.
78 stars 15 forks source link

Settings page does not work if gitolite-admin repo settings altered #75

Closed vikash closed 11 years ago

vikash commented 12 years ago

This is the error I am getting:

Processing ProjectsController#settings (for 180.151.36.170 at 2012-10-09 06:35:51) [GET]
  Parameters: {"id"=>"project-name", "action"=>"settings", "controller"=>"projects"}
Cloning gitolite-admin repository to /tmp/redmine_git_hosting/git/gitolite-admin
Setting up /usr/share/redmine/vendor/plugins/redmine_git_hosting/bin/
Attempting to restore repository access key:
  Cloning administrative repo directly as git in /tmp/fixrepo/git/gitolite-admin
Setting up /usr/share/redmine/vendor/plugins/redmine_git_hosting/bin/
***> Failed to reestablish gitolite admin key.
Setting up /usr/share/redmine/vendor/plugins/redmine_git_hosting/bin/
***> Cannot clone administrative repository.  Requires human intervention!!!
***> No such file or directory - /tmp/redmine_git_hosting/git/gitolite-admin/keydir

Even after I reverted everything to pre-plugin state, deleted of /tmp/redmine_git_hosting - this does not work. What kind of 'human intervention' is required?

(Thanks a lot for entertaining the queries and fixing them with lightning speed)

greizgh commented 12 years ago

There seems to be a problem with your private key. Can redmine access the admin private key? Can you manually clone the gitolite-admin repo?

kubitron commented 12 years ago

@vikash, can you tell me some additional details?

First, please run ./script/about and tell me that the output is. For instance, if you are using bash:

prompt% cd your/redmine/directory
prompt% export RAILS_ENV=production
prompt% ./script/about

Also, which version of gitolite are you using?

Second, this problem sounds like a configuration issue. When you say "settings page doesn't work if gitolite settings altered", does this mean that it does work otherwise? For instance, have you tried creating a project? Does it create a repository in the gitolite repository?

Can you send me more of your log?

kubitron commented 12 years ago

Incidentally, one possibility is what @greizgh suggests, i.e. that your gitolite configuration is not correctly set up. Did you create a new key as described in the README, put it in REDMINE_ROOT/.ssh, and put the proper file names in the settings page? [ Subsection (4) of the step-by-step configuration instructions]

Also, I wonder if you read/followed the README section on the bin directory [ Subsection (8) of the step-by-step configuration instructions]. It looks like the bin directory is getting recreated (which shouldn't happen too frequently). Have you tried creating the scripts explicitly? (i.e. perhaps REDMINE_ROOT/venor/plugins/redmine_git_hosting/bin is not writeable by the plugin?)

kubitron commented 12 years ago

@vikash, are you still there? I'm going to close this bug out if I haven't heard from you soon...

kubitron commented 12 years ago

(incidentally, you want to update to the latest master commit if still working on Redmine 1.3).

kubitron commented 12 years ago

@vikash, I'm closing out this bug. If you still have problems, you can reopen it.

vikash commented 11 years ago

Sorry for abandoning the ship and giving up on the settings page earlier. I upgraded to 0.5.1x today. Now this problem looks fixed partially. As the "/settings" page is getting displayed now. However, there is a red symbol in front of the git - just before "/usr/share/redmine/vendor/plugins/redmine_git_hosting/bin/run_git_as_git_user".

Here is my application environment:

Ruby version 1.8.7 (x86_64-linux) RubyGems version 1.8.15 Rack version 1.3 Rails version 2.3.14 Active Record version 2.3.14 Active Resource version 2.3.14 Action Mailer version 2.3.14 Active Support version 2.3.14 Edge Rails revision unknown Application root /usr/share/redmine Environment production Database adapter mysql Database schema version 20120904060609

About your Redmine plugins Redmine Git Hosting Plugin 0.5.1x

On the project repository page, I get "Repository is empty. Get started by following the instructions below." On the plugin configuration page, 'Git user is able to sudo to Web user' and 'Web user is able to sudo to Git user' is all green.

What can be the reason?

kubitron commented 11 years ago

I'm not sure I understand. Where is the red symbol on the settings page? (I don't understand the statement "in front of the git").

vikash commented 11 years ago

redmine

I was talking about this page. But, it got fixed after restart.

kubitron commented 11 years ago

Does this mean that everything is working now?

vikash commented 11 years ago

Looks like it. Thanks.

kubitron commented 11 years ago

Ok. I'm going to close the bug again.