Skip to content

edit repo internal error 500 and users stay empty #544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gvandenbosch opened this issue Nov 30, 2015 · 9 comments
Closed

edit repo internal error 500 and users stay empty #544

gvandenbosch opened this issue Nov 30, 2015 · 9 comments
Assignees
Labels

Comments

@gvandenbosch
Copy link

I have followed the following guide to setup redmine with git hosting:
http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_30x_on_Ubuntu_1404_with_Apache2_Phusion_Passenger_MySQL_Subversion_and_Git_(Gitolite)

I can create a repo without problems.
However when I click edit on the repo I get 500 internal error.
From the error log I can see the following:

Started GET "/redmine/repositories/2/edit" for 192.168.105.252 at 2015-11-30 05:01:36 +0100
Processing by RepositoriesController#edit as HTML
Parameters: {"id"=>"2"}
Current user: gvandenbosch (id=5)
Rendered plugins/redmine_bootstrap_kit/app/views/common/_modal_base.html.haml (0.4ms)
Rendered plugins/redmine_git_hosting/app/views/common/_git_hosting_js_headers.html.haml (2.7ms)
Rendered plugins/redmine_git_hosting/app/views/common/_git_urls.html.haml (7.4ms)
Rendered plugins/redmine_git_hosting/app/views/repositories/_edit_top.html.haml (11.8ms)
Rendered repositories/_form.html.erb (2.9ms)
Rendered plugins/redmine_git_hosting/app/views/repositories/_xitolite_options.html.haml (22.5ms)
Rendered plugins/redmine_git_hosting/app/views/repositories/edit.html.haml within layouts/base (40.9ms)
Completed 500 Internal Server Error in 50ms (ActiveRecord: 1.3ms)

ActionView::Template::Error (undefined method `empty?' for nil:NilClass):
35: 
36:               %p
37:                 = label_tag 'repository_git_extra[default_branch]', l(:label_repository_default_branch)
38:                 - if !repository.branches.empty?
39:                   = f.select :default_branch, repository_branches_list(repository.branches)
40:                 - else
41:                   %span{ class: 'label label-info' }= repository.git_default_branch
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Also when i click repositories->users this keeps saying "No data to display".
I probably misconfigured something, but I am unable to find it, could someone give me a pointer?

@n-rodriguez
Copy link
Contributor

First check that the plugin is well installed : http://redmine-git-hosting.io/get_started/

@n-rodriguez n-rodriguez self-assigned this Nov 30, 2015
@gvandenbosch
Copy link
Author

Everything on the config test tab is green except the gitolite version, it is red and says "unknown version".
When I query the version with dpkg -s it tells me version 2.3-1

@n-rodriguez
Copy link
Contributor

Which version of the plugin are you running? And can you provide the output of :

root$ su - redmine
redmine$ ssh -i ssh_keys/redmine_gitolite_admin_id_rsa git@localhost info

@gvandenbosch
Copy link
Author

I am running version 1.1.1

When I execute that command it is asking for a password for git user, which I don't have.

@n-rodriguez
Copy link
Contributor

When I execute that command it is asking for a password for git user, which I don't have.

It shouldn't. The SSH key is here to avoid this precisely.

@n-rodriguez
Copy link
Contributor

btw you should upgrade at least to 1.1.5.

@gvandenbosch
Copy link
Author

I found the GIT problem.

Currently in my authorized_keys file I have:

command="/usr/share/gitolite/gl-auth-command admin",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty  /opt/redmine/.ssh/redmine_gitolite_admin_id_rsa.pub

However this doesn't work properly, when I replace /opt/redmine/.ssh/redmine_gitolite_admin_id_rsa.pub with the actual public key then the command

 redmine$ ssh -i ssh_keys/redmine_gitolite_admin_id_rsa git@localhost info

Works perfectly, however when I do something with the repositories in redmine then the public key is automatically replaced with the path to the key again which then breaks the ssh as well.

@n-rodriguez
Copy link
Contributor

Works perfectly, however when I do something with the repositories in redmine then the public key is automatically replaced with the path to the key again which then breaks the ssh as well.

Reinstall Gitolite with the right SSH key.

@gvandenbosch
Copy link
Author

I reinstalled gitolite with apt-get, I had to remove folder /opt/gitolite after uninstall and then could install and run dpkg-reconfigure gitolite, then configured with key content instead of key file path and now it keeps working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants