Skip to content

[1.0.4] On delete deploy key: Rugged::NetworkError (Early EOF): #418

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
WMP opened this issue Apr 11, 2015 · 17 comments
Closed

[1.0.4] On delete deploy key: Rugged::NetworkError (Early EOF): #418

WMP opened this issue Apr 11, 2015 · 17 comments
Assignees
Labels
Milestone

Comments

@WMP
Copy link

WMP commented Apr 11, 2015

This is when i trying to remove any deploy key:

Started GET "/repositories/105/deployment_credentials" for 77.255.235.245 at 2015-04-11 13:10:09 +0200
Processing by RepositoryDeploymentCredentialsController#index as */*
  Parameters: {"repository_id"=>"105"}
  Current user: wmp (id=38)
  Rendered plugins/redmine_git_hosting/app/views/repository_deployment_credentials/index.html.haml (3.8ms)
Completed 200 OK in 20.5ms (Views: 3.9ms | ActiveRecord: 3.5ms)
Started DELETE "/repositories/105/deployment_credentials/27" for 77.255.235.245 at 2015-04-11 13:10:12 +0200
Processing by RepositoryDeploymentCredentialsController#destroy as JS
  Parameters: {"repository_id"=>"105", "id"=>"27"}
  Current user: wmp (id=38)
Completed 500 Internal Server Error in 261.4ms

Rugged::NetworkError (Early EOF):
  rugged (0.21.4) lib/rugged/repository.rb:203:in `fetch'
  rugged (0.21.4) lib/rugged/repository.rb:203:in `fetch'
  /home/redmine/.rvm/gems/ruby-2.1.1/bundler/gems/gitolite-rugged-eaa0d7a84b30/lib/gitolite/gitolite_admin.rb:274:in `update'
  /home/redmine/.rvm/gems/ruby-2.1.1/bundler/gems/gitolite-rugged-eaa0d7a84b30/lib/gitolite/gitolite_admin.rb:107:in `initialize'
  plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:67:in `new'
  plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:67:in `gitolite_admin'
  plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:39:in `resync_gitolite'
  plugins/redmine_git_hosting/lib/redmine_git_hosting.rb:50:in `resync_gitolite'
  plugins/redmine_git_hosting/app/services/gitolite_accessor.rb:109:in `resync_gitolite'
  plugins/redmine_git_hosting/app/services/gitolite_accessor.rb:33:in `update_repository'
  plugins/redmine_git_hosting/app/controllers/repository_deployment_credentials_controller.rb:117:in `call_use_case'
  plugins/redmine_git_hosting/app/controllers/redmine_git_hosting_controller.rb:100:in `call_use_case_and_redirect'
  plugins/redmine_git_hosting/app/controllers/repository_deployment_credentials_controller.rb:56:in `destroy'
  actionpack (3.2.21) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.21) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.21) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.21) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.21) lib/active_support/callbacks.rb:568:in `_run__1457065048321359541__process_action__2506911639764207880__callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.21) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.21) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.21) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.21) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.21) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.21) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.21) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.21) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.21) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  activerecord (3.2.21) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.21) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.21) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.21) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.21) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.21) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `each'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:608:in `call'
  rack-openid (1.4.2) lib/rack/openid.rb:98:in `call'
  request_store (1.0.5) lib/request_store/middleware.rb:9:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.5) lib/rack/etag.rb:23:in `call'
  rack (1.4.5) lib/rack/conditionalget.rb:35:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/no_parse.rb:33:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
  rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.21) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.21) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `_run__301238506302293887__call__4081529540629204895__callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.21) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.21) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.21) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.21) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.21) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.21) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.5) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.21) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.5) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/static.rb:83:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
  rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
  rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.21) lib/rails/engine.rb:484:in `call'
  railties (3.2.21) lib/rails/application.rb:231:in `call'
  railties (3.2.21) lib/rails/railtie/configurable.rb:30:in `method_missing'
  passenger (4.0.53) lib/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
  passenger (4.0.53) lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
  passenger (4.0.53) lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
  passenger (4.0.53) lib/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
@WMP
Copy link
Author

WMP commented Apr 11, 2015

I have this same on adding new deploy key or user key.

Problems has begin after trying to create repository mirror on 1.0.2.

@n-rodriguez
Copy link
Contributor

Does repo creation work?

@n-rodriguez n-rodriguez self-assigned this Apr 13, 2015
@WMP
Copy link
Author

WMP commented Apr 15, 2015

Yes, i have this same error on creating repository or adding new project.

Two days ago i restore redmine from backup before creating repository mirror and all works good. Today, problem go back on creating new project, without creating repository mirror.

@n-rodriguez
Copy link
Contributor

Be sure that the gitolite_private_key you have configured has RW+ access to Gitolite admin repository.

@WMP
Copy link
Author

WMP commented Apr 15, 2015

Sorry, i dont know where i should looking for this.

@saz
Copy link

saz commented Apr 17, 2015

I'm running into the same issue since I've changed permissions on my projects.

I'm seeing an internal server error, as soon as I'm changing a project setting. This is happening for all projects, even if the repository module isn't enabled.

The config test looks like, as everything is working. Trying SSH access with the redmine key results in the following output:

www-data@lifeguard:~$ ssh -i /var/lib/redmine/default/redmine_git_hosting/ssh/redmine_gitolite_admin_id_rsa [email protected] info
hello admin, this is gitolite@lifeguard running gitolite3 3.5.3.1-2 (Debian) on git 1.9.1

www-data@lifeguard:~$

I've also tried to remove the checked out version of gitolite-admin in /tmp /tmp/redmine_git_hosting/gitolite/gitolite-admin.git. Resyncing all projects and ssh keys will leave me with an empty directory in the temp directory. Before removing this directory, a checked out version of gitolite-admin was in this directory.

This is the message I'm seeing in the git_hosting.log as soon as I'm trying to save project settings:

2015-04-17 13:53:33 +0200 [INFO] Set Git daemon for repositories of project : 'Entwicklung'
2015-04-17 13:53:33 +0200 [INFO] Accessing gitolite-admin.git at '/tmp/redmine_git_hosting/gitolite/gitolite-admin.git'

As there is no repository inside the mentioned directory, this will clearly fail.

Is there a way to enable some more debugging information?

@saz
Copy link

saz commented Apr 17, 2015

The following is missing from my gitolite.conf now:

repo    gitolite-admin
  RW+                            = admin

This might explain, why there is no access possible and the info command won't show any repo, but I don't know, why this line is missing.

@saz
Copy link

saz commented Apr 17, 2015

http://gitolite.com/gitolite/emergencies.html#bypass helped me in solving my issue. I've gave the admin key permissions for gitolite-admin and everything is working again.

@saz
Copy link

saz commented Apr 17, 2015

But I still think, this error should be catched and a useful message in the log would be good.
Also should the plugin check, if the repository module is enabled.

@WMP
Copy link
Author

WMP commented Apr 21, 2015

@n-rodriguez: Any update about this issue? My redmine is useless.

@n-rodriguez
Copy link
Contributor

Can you try this :

root# su - redmine
redmine$ eval $(ssh-agent -t 10)
redmine$ ssh-add /home/redmine/redmine/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa
redmine$ git clone ssh://git@localhost:22/gitolite-admin.git

@n-rodriguez
Copy link
Contributor

I think you have reused Gitolite admin key as a deployment key. So Gitolite thinks that this is the deployment user who tries to clone the gitolite-admin.git repo and denies access.

You must not do that : http://redmine-git-hosting.io/get_started/#step-10-add-your-ssh-keys.

Check Gitolite logs in <gitolite home dir>/.gitolite/logs (you may need to enable them before in <gitolite home dir>/.gitolite.rc file).

@n-rodriguez
Copy link
Contributor

@saz

But I still think, this error should be catched and a useful message in the log would be good.

Done in commit : 8a81ac2.

This will be included in next release (1.0.5)

@n-rodriguez n-rodriguez added bug and removed question labels May 7, 2015
@n-rodriguez n-rodriguez added this to the v1.0.5 milestone May 7, 2015
@MikhailKrasnobaev
Copy link

Had the same issue as @saz, had to use the same trick. I'm not sure what was the problem, but on the config test page I saw only testing repo.

@n-rodriguez
Copy link
Contributor

I'm not sure what was the problem, but on the config test page I saw only testing repo.

You may have reused Gitolite admin key as a deployment key or a user key.

You must not do that : http://redmine-git-hosting.io/get_started/#step-10-add-your-ssh-keys.

@wilsoc5
Copy link

wilsoc5 commented May 11, 2015

@n-rodriguez
Copy link
Contributor

@wilsoc5 : I don't think so. This part is handled by the plugin. You should not do that.

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

5 participants