Skip to content

Can't add Git Config Key #576

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
0x6263 opened this issue Mar 1, 2016 · 1 comment
Closed

Can't add Git Config Key #576

0x6263 opened this issue Mar 1, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@0x6263
Copy link

0x6263 commented Mar 1, 2016

Hi,

when I try to add a Git Config Key, the request results in a 500 Internal Server Error.
In the production.log I see the following error:

Completed 500 Internal Server Error in 29ms (ActiveRecord: 12.6ms)
ActiveRecord::SubclassNotFound (Invalid single-table inheritance type: RepositoryGitConfigKey::Config is not a subclass of RepositoryGitConfigKey::GitConfig):
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Adding a Gitolite option works without problems.

I'm running redmine 3.2.0 with redmine_git_hosting 1.2.0 and gitolite v3.

@ajongbloets
Copy link

+1 Same here

Figured there is a name mismatch:

app/models/repository_git_config_key.rb uses (line 12):

validates :type,          presence: true, inclusion: { in: ['RepositoryGitConfigKey::GitConfig', 'RepositoryGitConfigKey::Option'] }

while in app/controllers/repository_git_config_keys_controller.rb it says (line 56):

when 'RepositoryGitConfigKey::Config'

and in app/helpers/repository_git_config_keys_helper.rb:

def git_config_key_options
    [
      [l(:label_git_key_type_config), 'RepositoryGitConfigKey::Config'],
      [l(:label_git_key_type_option), 'RepositoryGitConfigKey::Option']
    ]
end

I was able to fix the issue by changing the latter 2 files.

@n-rodriguez n-rodriguez self-assigned this Aug 15, 2016
@n-rodriguez n-rodriguez added this to the v1.2.2 milestone Aug 15, 2016
n-rodriguez pushed a commit that referenced this issue Aug 15, 2016
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

3 participants