Skip to content

plugin does not work correctly with custom ssh port #560

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
v1co1n opened this issue Jan 9, 2016 · 2 comments
Closed

plugin does not work correctly with custom ssh port #560

v1co1n opened this issue Jan 9, 2016 · 2 comments
Assignees

Comments

@v1co1n
Copy link

v1co1n commented Jan 9, 2016

I got this error in my production log, when i press apply button on git_hosting plugin page.
There are no errors in git_hosting.log , and everything seems to be ok, but apply button not working.
And the same error im getting everytime i try to do some changes to gitolite repositories in my projects.

Production.log

Started POST "/settings/plugin/redmine_git_hosting" for x.x.x.x at 2016-01-09 09:09:56 +0300
Processing by SettingsController#plugin as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"fjD0e6U3WWUVgrOVooRY3Ldglkqr+X7ymqOTX7zzJrXCUrVopJ84v1BJF3j7ozluhvV5GSHsOmte90uTFvIIzg==", "settings"=>{"gitolite_user"=>"git", "gitolite_ssh_private_key"=>"/data/apps/redmine/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa", "gitolite_ssh_public_key"=>"/data/apps/redmine/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa.pub", "gitolite_server_host"=>"127.0.0.1", "gitolite_server_port"=>"1984", "gitolite_global_storage_dir"=>"repositories/", "gitolite_recycle_bin_dir"=>"recycle_bin/", "gitolite_redmine_storage_dir"=>"", "gitolite_local_code_dir"=>"hooks/", "gitolite_lib_dir"=>"bin/lib/", "gitolite_config_file"=>"gitolite.conf", "gitolite_identifier_prefix"=>"redmine_", "gitolite_identifier_strip_user_id"=>"true", "gitolite_temp_dir"=>"/tmp/redmine_git_hosting/", "gitolite_recycle_bin_expiration_time"=>"24.0", "gitolite_log_level"=>"info", "git_config_username"=>"Redmine Git Hosting", "git_config_email"=>"[email protected]", "ssh_server_domain"=>"localhost", "http_server_domain"=>"localhost", "https_server_domain"=>"localhost", "http_server_subdir"=>"", "gitolite_http_by_default"=>"1", "show_repositories_url"=>"true", "gitolite_daemon_by_default"=>"false", "download_revision_enabled"=>"true", "gitolite_overwrite_existing_hooks"=>"true", "gitolite_hooks_are_asynchronous"=>"false", "gitolite_hooks_debug"=>"false", "gitolite_hooks_url"=>"http://localhost:3000", "gitolite_cache_max_time"=>"86400", "gitolite_cache_max_size"=>"16", "gitolite_cache_max_elements"=>"2000", "gitolite_cache_adapter"=>"database", "gitolite_notify_by_default"=>"false", "gitolite_notify_global_prefix"=>"[REDMINE]", "gitolite_notify_global_sender_address"=>"[email protected]", "gitolite_notify_global_include"=>[""], "gitolite_notify_global_exclude"=>[""], "redmine_has_rw_access_on_all_repos"=>"true", "all_projects_use_git"=>"false", "init_repositories_on_create"=>"false", "delete_git_repositories"=>"true", "hierarchical_organisation"=>"true", "gitolite_use_sidekiq"=>"false"}, "commit"=>"Применить", "id"=>"redmine_git_hosting"}
  Current user: Test (id=24)
Settings cache cleared.
Completed 500 Internal Server Error in 60ms (ActiveRecord: 31.0ms)

Rugged::OSError (Failed to connect to localhost: Connection refused):
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

git_hosting.log

2016-01-09 09:09:47 +0300 [INFO] Testing if Redmine user 'labs' can sudo to Gitolite user 'git'...
2016-01-09 09:09:47 +0300 [INFO] OK!
2016-01-09 09:09:56 +0300 [INFO] Flush Settings Cache !
2016-01-09 09:09:56 +0300 [INFO] Settings cache flushed!
2016-01-09 09:09:56 +0300 [INFO] Enable RW access on all Gitolite repositories

My environment:

Environment:
  Redmine version                3.1.1.devel
  Ruby version                   1.9.3-p484 (2013-11-22) [x86_64-linux]
  Rails version                  4.2.5
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            1.9.1
  Filesystem                     
  Xitolite                       1.9.1
Redmine plugins:
  a_common_libs                  2.0.0
  ajax_counters                  1.2.0
  periodictask                   3.1.1
  redmine_banner                 0.1.1
  redmine_bootstrap_kit          0.2.4
  redmine_checklists             3.1.3
  redmine_contacts               4.0.3
  redmine_git_hosting            1.2.0
  unread_issues                  2.0.0
@v1co1n
Copy link
Author

v1co1n commented Jan 9, 2016

The problem is plugin does not work correctly with custom ssh port , when i set it to default the problem gone

@v1co1n v1co1n closed this as completed Jan 9, 2016
@n-rodriguez n-rodriguez changed the title Rugged::OSError (Failed to connect to localhost: Connection refused): lib/redmine/sudo_mode.rb:63:in `sudo_mode' plugin does not work correctly with custom ssh port Feb 9, 2016
@n-rodriguez n-rodriguez self-assigned this Feb 9, 2016
@n-rodriguez n-rodriguez added the bug label Feb 9, 2016
@n-rodriguez n-rodriguez reopened this Feb 9, 2016
@jblobb
Copy link

jblobb commented Feb 14, 2016

#569

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

No branches or pull requests

3 participants