redmine-git-hosting / redmine_git_hosting

A Redmine plugin which makes configuring your own Git hosting easy ;)
http://redmine-git-hosting.io
MIT License
275 stars 116 forks source link

Can't create repository #235

Closed AntonPyrkh closed 10 years ago

AntonPyrkh commented 10 years ago

Hello, i've spend a lot of time for trying to install your plugin and reinstall it lots of time, but now i've gave up. I need your help. For now i can't even create a repo. But earlier i did... with another problems... Now I'm installing redmine and plugin with gitolite on my local pc to figure out what the problem is with all of this. My configuration:

Environment:
  Redmine version                2.5.2.stable
  Ruby version                   2.1.2-p95 (2014-05-08) [x86_64-linux]
  Rails version                  3.2.19
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            1.9.1
  Filesystem                     
Redmine plugins:
  redmine_bootstrap_kit          0.1
  redmine_git_hosting            0.7.5
  redmine_sidekiq                2.1.0

All i did following by "step by step" instruction plugin install on tag 0.7.5 gitolite on commit v3.6.1 Also i followed troubleshooting about .ssh/config ...(done everything written there) and try to add hostname there. But i think it's no metters right now. I figure out that when i try to create project(with initial repo or new repo) the following is hapenning. /tmp/redmine_git_hosting/git/gitolite-admin.git this is clone admin-gitolite repo as i understand by default. if i check 'git status' i get 'modified: conf/gitolite.conf', i check this file and there i find all what i should get( i mean new configuration for new repo) but noone didn't push this repo to the origin master (so gitolite can understand that he should create new repository with correct rights). Also this repo is there by default, if i change my tmp dir trere are no gitolite-admin repo. Can you explain how it works and should work and what should i do with it. Also my logs: githosting.log

2014-07-15 11:59:00 +0300 INFO [GitHosting] Testing if Gitolite user 'git' can sudo to Redmine user 'anton'...
2014-07-15 11:59:00 +0300 INFO [GitHosting] OK!
2014-07-15 11:59:00 +0300 INFO [GitHosting] Testing if Redmine user 'anton' can sudo to Gitolite user 'git'...
2014-07-15 11:59:00 +0300 INFO [GitHosting] OK!
2014-07-15 11:59:00 +0300 INFO [GitHosting] Global hook directory '~/.gitolite/hooks/common/post-receive.d' is already present, will not touch it !
2014-07-15 11:59:00 +0300 INFO [GitHosting] Our 'post-receive.redmine_gitolite.rb' hook is already installed
2014-07-15 11:59:00 +0300 INFO [GitHosting] Our 'post-receive.git_multimail.py' hook is already installed
2014-07-15 11:59:00 +0300 INFO [GitHosting] Our 'post-receive.mail_notifications.py' hook is already installed
2014-07-15 11:59:00 +0300 INFO [GitHosting] Installing Redmine Gitolite mirroring SSH keys ...
2014-07-15 11:59:01 +0300 INFO [GitHosting] Done !
2014-07-15 11:59:12 +0300 INFO [GitHosting] Testing if Gitolite user 'git' can sudo to Redmine user 'anton'...
2014-07-15 11:59:12 +0300 INFO [GitHosting] OK!
2014-07-15 11:59:12 +0300 INFO [GitHosting] Testing if Redmine user 'anton' can sudo to Gitolite user 'git'...
2014-07-15 11:59:12 +0300 INFO [GitHosting] OK!
2014-07-15 11:59:12 +0300 INFO [GitHosting] Global hook directory '~/.gitolite/hooks/common/post-receive.d' is already present, will not touch it !
2014-07-15 11:59:12 +0300 INFO [GitHosting] Our 'post-receive.redmine_gitolite.rb' hook is already installed
2014-07-15 11:59:12 +0300 INFO [GitHosting] Our 'post-receive.git_multimail.py' hook is already installed
2014-07-15 11:59:12 +0300 INFO [GitHosting] Our 'post-receive.mail_notifications.py' hook is already installed
2014-07-15 11:59:12 +0300 INFO [GitHosting] Installing Redmine Gitolite mirroring SSH keys ...
2014-07-15 11:59:13 +0300 INFO [GitHosting] Done !
2014-07-15 11:59:40 +0300 INFO [GitHosting] User 'admin' created a new repository 'second_try'
2014-07-15 11:59:40 +0300 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-07-15 11:59:40 +0300 INFO [GitWorker] add_repository : repository 'second_try' does not exist in Gitolite, create it ...
2014-07-15 11:59:40 +0300 INFO [GitWorker] add_repository : commiting to Gitolite...
2014-07-15 11:59:40 +0300 INFO [GitWorker] add_repository : let Gitolite create empty repository 'repositories/second_try.git'
2014-07-15 11:59:40 +0300 INFO [GitWorker] add_repository : pushing to Gitolite...
2014-07-15 11:59:40 +0300 INFO [GitWorker] add_repository : done !
2014-07-15 11:59:40 +0300 INFO [GitWorker] Create README file for repository 'second_try'
2014-07-15 11:59:40 +0300 ERROR [GitWorker] Error while creating README file for repository 'second_try'
2014-07-15 11:59:40 +0300 ERROR [GitWorker] Command output : 'Cloning into '/tmp/d20140715-10411-tct7lb'...
[GitWorker]  FATAL: R any second_try redmine_gitolite_admin_id_rsa DENIED by fallthru
[GitWorker]  (or you mis-spelled the reponame)
[GitWorker]  fatal: Could not read from remote repository.
[GitWorker]  
[GitWorker]  Please make sure you have the correct access rights
[GitWorker]  and the repository exists.'
2014-07-15 11:59:40 +0300 ERROR [GitCache] Git exited with non-zero status : 128

.gitolite/logs/gitolite-2014-07.log

2014-07-15.11:59:00     10946   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.11:59:00     10946           system,gitolite,info
2014-07-15.11:59:00     10946           system,/home/git/bin/commands/info
2014-07-15.11:59:01     11177   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.11:59:01     11177           system,gitolite,info
2014-07-15.11:59:01     11177           system,/home/git/bin/commands/info
2014-07-15.11:59:12     11246   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.11:59:12     11246           system,gitolite,info
2014-07-15.11:59:12     11246           system,/home/git/bin/commands/info
2014-07-15.11:59:13     11476   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.11:59:13     11476           system,gitolite,info
2014-07-15.11:59:13     11476           system,/home/git/bin/commands/info
2014-07-15.11:59:40     11551   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=git-upload-pack '/second_try.git'   FROM=127.0.0.1
2014-07-15.11:59:40     11551           repo 'second_try' missing
2014-07-15.11:59:40     11551   die     R any second_try redmine_gitolite_admin_id_rsa DENIED by fallthru<<newline>>(or you mis-spelled the reponame)

I have sidekiq on and run hierarhical mode automatically initialize with readme file access all servers localhost as i testing on my local machine earlier i force) plugin to create repos but have problems with updating redmine hooks, latest reinstall of redmine and plugin ruined everythin. Please i really need your help

n-rodriguez commented 10 years ago

Hi!

Can you provide acces to the server (ssh and http)?

AntonPyrkh commented 10 years ago

Sorry, i can't. Still trying to reinstall everything but all that i get is same as was before. all changes goes to default path /tmp/redmine_git_hosting/git/gitolite-admin.git and changes lost there uncommited.

n-rodriguez commented 10 years ago

Ok. Can you try with the devel branch?

AntonPyrkh commented 10 years ago

on devel brunch i've got following errors (i delete plugin and install it again as redmine docs says) production.log

Rugged::NetworkError (This transport isn't implemented. Sorry):
  rugged (0.21.0) lib/rugged/repository.rb:217:in `push'
  rugged (0.21.0) lib/rugged/repository.rb:217:in `push'
  /home/anton/.rvm/gems/ruby-2.1.2@new-day-new-redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:221:in `apply'
  /home/anton/.rvm/gems/ruby-2.1.2@new-day-new-redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:240:in `block in transaction'
  /home/anton/.rvm/gems/ruby-2.1.2@new-day-new-redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:335:in `block in get_lock'
  /home/anton/.rvm/gems/ruby-2.1.2@new-day-new-redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:331:in `open'
  /home/anton/.rvm/gems/ruby-2.1.2@new-day-new-redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:331:in `get_lock'
  /home/anton/.rvm/gems/ruby-2.1.2@new-day-new-redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:236:in `transaction'
  plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper/repositories.rb:19:in `add_repository'
  plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper.rb:654:in `block in update'
  plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper.rb:652:in `each'
  plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper.rb:652:in `update'
  plugins/redmine_git_hosting/lib/redmine_gitolite/git_hosting.rb:36:in `resync_gitolite'
  plugins/redmine_git_hosting/lib/redmine_git_hosting/patches/projects_controller_patch.rb:132:in `git_repo_init'
  plugins/redmine_git_hosting/lib/redmine_git_hosting/patches/projects_controller_patch.rb:32:in `create_with_git_hosting'
  actionpack (3.2.19) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.19) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.19) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.19) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.19) lib/active_support/callbacks.rb:480:in `_run__398696107409397442__process_action__3579761742452291585__callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.19) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.19) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.19) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.19) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.19) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.19) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.19) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.19) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.19) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  activerecord (3.2.19) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.19) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.19) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.19) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.19) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.19) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.19) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.19) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.19) 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.19) lib/action_dispatch/routing/route_set.rb:608:in `call'
  rack-openid (1.4.2) lib/rack/openid.rb:98:in `call'
  actionpack (3.2.19) 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.19) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.19) 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.19) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.19) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.19) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `_run__3394394589054358071__call__4072579828669176035__callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.19) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.19) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.19) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.19) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.19) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.19) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.19) 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.19) 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.19) lib/action_dispatch/middleware/static.rb:63: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.19) lib/rails/engine.rb:484:in `call'
  railties (3.2.19) lib/rails/application.rb:231:in `call'
  rack (1.4.5) lib/rack/content_length.rb:14:in `call'
  railties (3.2.19) lib/rails/rack/log_tailer.rb:17:in `call'
  rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
  /home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
  /home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
  /home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

git_hosting.log

2014-07-15 18:19:35 +0300 ERROR [GitHosting] Problems to retrieve Gitolite hook parameters in Gitolite config 'namespace : multimailhook'
2014-07-15 18:19:35 +0300 INFO [GitHosting] Testing if Gitolite user 'git' can sudo to Redmine user 'anton'...
2014-07-15 18:19:35 +0300 INFO [GitHosting] OK!
2014-07-15 18:19:35 +0300 INFO [GitHosting] Testing if Redmine user 'anton' can sudo to Gitolite user 'git'...
2014-07-15 18:19:35 +0300 INFO [GitHosting] OK!
2014-07-15 18:19:35 +0300 ERROR [GitHosting] Problems to retrieve Gitolite hook parameters in Gitolite config 'namespace : multimailhook'
2014-07-15 18:19:35 +0300 INFO [GitHosting] Global hook directory '$HOME/.gitolite/hooks/common/post-receive.d' is already present, will not touch it !
2014-07-15 18:19:35 +0300 WARN [GitHosting] Hook 'post-receive.redmine_gitolite.rb' is already present but it's not ours!
2014-07-15 18:19:35 +0300 INFO [GitHosting] Restoring 'post-receive.redmine_gitolite.rb' hook since forceInstallHook == true
2014-07-15 18:19:35 +0300 INFO [GitHosting] Installing hook '/home/anton/work/redmine/plugins/redmine_git_hosting/contrib/hooks/post-receive.redmine_gitolite.rb' in '$HOME/.gitolite/hooks/common/post-receive'
2014-07-15 18:19:35 +0300 INFO [GitHosting] Hook 'post-receive.redmine_gitolite.rb' installed
2014-07-15 18:19:35 +0300 INFO [GitHosting] Running 'gitolite setup' on the Gitolite install...
2014-07-15 18:19:35 +0300 WARN [GitHosting] Hook 'post-receive.git_multimail.py' is already present but it's not ours!
2014-07-15 18:19:35 +0300 INFO [GitHosting] Restoring 'post-receive.git_multimail.py' hook since forceInstallHook == true
2014-07-15 18:19:35 +0300 INFO [GitHosting] Installing hook '/home/anton/work/redmine/plugins/redmine_git_hosting/contrib/hooks/post-receive.git_multimail.py' in '$HOME/.gitolite/hooks/common/post-receive.d/git_multimail.py'
2014-07-15 18:19:35 +0300 INFO [GitHosting] Hook 'post-receive.git_multimail.py' installed
2014-07-15 18:19:35 +0300 INFO [GitHosting] Running 'gitolite setup' on the Gitolite install...
2014-07-15 18:19:35 +0300 INFO [GitHosting] Our 'post-receive.mail_notifications.py' hook is already installed
2014-07-15 18:19:35 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.mailer (smtp)
2014-07-15 18:19:35 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.environment (gitolite)
2014-07-15 18:19:35 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpAuth (true)
2014-07-15 18:19:35 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpServer (smtp.example.net)
2014-07-15 18:19:36 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpPort (25)
2014-07-15 18:19:36 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpUser (redmine@example.net)
2014-07-15 18:19:36 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpPass (redmine)
2014-07-15 18:19:36 +0300 INFO [GitHosting] Installing Redmine Gitolite mirroring SSH keys ...
2014-07-15 18:19:36 +0300 INFO [GitHosting] Done !
2014-07-15 18:20:06 +0300 INFO [GitCache] Removed '0' expired cache entries among all repositories
2014-07-15 18:20:07 +0300 INFO [GitHosting] Testing if Gitolite user 'git' can sudo to Redmine user 'anton'...
2014-07-15 18:20:07 +0300 INFO [GitHosting] OK!
2014-07-15 18:20:07 +0300 INFO [GitHosting] Testing if Redmine user 'anton' can sudo to Gitolite user 'git'...
2014-07-15 18:20:07 +0300 INFO [GitHosting] OK!
2014-07-15 18:20:07 +0300 INFO [GitHosting] Global hook directory '$HOME/.gitolite/hooks/common/post-receive.d' is already present, will not touch it !
2014-07-15 18:20:07 +0300 INFO [GitHosting] Our 'post-receive.redmine_gitolite.rb' hook is already installed
2014-07-15 18:20:07 +0300 INFO [GitHosting] Our 'post-receive.git_multimail.py' hook is already installed
2014-07-15 18:20:07 +0300 INFO [GitHosting] Our 'post-receive.mail_notifications.py' hook is already installed
2014-07-15 18:20:07 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpAuth (true)
2014-07-15 18:20:07 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpServer (smtp.example.net)
2014-07-15 18:20:07 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpPort (25)
2014-07-15 18:20:07 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpUser (redmine@example.net)
2014-07-15 18:20:07 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpPass (redmine)
2014-07-15 18:20:07 +0300 INFO [GitHosting] Installing Redmine Gitolite mirroring SSH keys ...
2014-07-15 18:20:07 +0300 INFO [GitHosting] Done !
2014-07-15 18:20:14 +0300 INFO [GitHosting] Testing if Gitolite user 'git' can sudo to Redmine user 'anton'...
2014-07-15 18:20:14 +0300 INFO [GitHosting] OK!
2014-07-15 18:20:14 +0300 INFO [GitHosting] Testing if Redmine user 'anton' can sudo to Gitolite user 'git'...
2014-07-15 18:20:14 +0300 INFO [GitHosting] OK!
2014-07-15 18:20:14 +0300 INFO [GitHosting] Global hook directory '$HOME/.gitolite/hooks/common/post-receive.d' is already present, will not touch it !
2014-07-15 18:20:14 +0300 INFO [GitHosting] Our 'post-receive.redmine_gitolite.rb' hook is already installed
2014-07-15 18:20:14 +0300 INFO [GitHosting] Our 'post-receive.git_multimail.py' hook is already installed
2014-07-15 18:20:14 +0300 INFO [GitHosting] Our 'post-receive.mail_notifications.py' hook is already installed
2014-07-15 18:20:14 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpAuth (true)
2014-07-15 18:20:15 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpServer (smtp.example.net)
2014-07-15 18:20:15 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpPort (25)
2014-07-15 18:20:15 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpUser (redmine@example.net)
2014-07-15 18:20:15 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpPass (redmine)
2014-07-15 18:20:15 +0300 INFO [GitHosting] Installing Redmine Gitolite mirroring SSH keys ...
2014-07-15 18:20:15 +0300 INFO [GitHosting] Done !
2014-07-15 18:21:12 +0300 INFO [GitHosting] Testing if Gitolite user 'git' can sudo to Redmine user 'anton'...
2014-07-15 18:21:12 +0300 INFO [GitHosting] OK!
2014-07-15 18:21:12 +0300 INFO [GitHosting] Testing if Redmine user 'anton' can sudo to Gitolite user 'git'...
2014-07-15 18:21:12 +0300 INFO [GitHosting] OK!
2014-07-15 18:21:12 +0300 INFO [GitHosting] Global hook directory '$HOME/.gitolite/hooks/common/post-receive.d' is already present, will not touch it !
2014-07-15 18:21:12 +0300 INFO [GitHosting] Our 'post-receive.redmine_gitolite.rb' hook is already installed
2014-07-15 18:21:12 +0300 INFO [GitHosting] Our 'post-receive.git_multimail.py' hook is already installed
2014-07-15 18:21:12 +0300 INFO [GitHosting] Our 'post-receive.mail_notifications.py' hook is already installed
2014-07-15 18:21:12 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpAuth (true)
2014-07-15 18:21:12 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpServer (smtp.example.net)
2014-07-15 18:21:12 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpPort (25)
2014-07-15 18:21:12 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpUser (redmine@example.net)
2014-07-15 18:21:12 +0300 INFO [GitHosting] Set Git hooks global parameter : multimailhook.smtpPass (redmine)
2014-07-15 18:21:12 +0300 INFO [GitHosting] Installing Redmine Gitolite mirroring SSH keys ...
2014-07-15 18:21:12 +0300 INFO [GitHosting] Done !
2014-07-15 18:22:07 +0300 INFO [GitHosting] User 'admin' created a new repository 'onenewnewprl'
2014-07-15 18:22:07 +0300 INFO [GitHosting] Acessing gitolite-admin.git at '/tmp/redmine_git_hosting/git/gitolite-admin.git'
2014-07-15 18:22:07 +0300 INFO [GitWorker] add_repository : repository 'onenewnewprl' does not exist in Gitolite, create it ...
2014-07-15 18:22:07 +0300 INFO [GitWorker] add_repository : commiting to Gitolite...
2014-07-15 18:22:07 +0300 INFO [GitWorker] add_repository : let Gitolite create empty repository 'repositories/onenewnewprl.git'

worker log

2014-07-15T15:20:25.481Z 5622 TID-7qr78 DEBUG: Got TERM signal
2014-07-15T15:20:25.481Z 5622 TID-7qr78 INFO: Shutting down
2014-07-15T15:20:26.025Z 5622 TID-oxapgwos8 INFO: Shutting down 1 quiet workers
2014-07-15T15:20:26.026Z 5622 TID-7qr78 DEBUG: Terminating 6 actors...
WARN: Unresolved specs during Gem::Specification.reset:
      rake (>= 0.8.7)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Could not find codeclimate-test-reporter-0.3.0 in any of the sources
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler/spec_set.rb:92:in `block in materialize'
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler/spec_set.rb:85:in `map!'
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler/spec_set.rb:85:in `materialize'
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler/definition.rb:133:in `specs'
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler/definition.rb:178:in `specs_for'
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler/definition.rb:167:in `requested_specs'
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler/environment.rb:18:in `requested_specs'
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler/runtime.rb:13:in `setup'
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler.rb:120:in `setup'
/home/anton/.rvm/gems/ruby-2.1.2/gems/bundler-1.6.3/lib/bundler/setup.rb:17:in `<top (required)>'
/home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
/home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
/home/anton/work/redmine/config/boot.rb:6:in `<top (required)>'
/home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/home/anton/work/redmine/config/application.rb:1:in `<top (required)>'
/home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/home/anton/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/home/anton/.rvm/gems/ruby-2.1.2/gems/sidekiq-3.2.1/lib/sidekiq/cli.rb:231:in `boot_system'
/home/anton/.rvm/gems/ruby-2.1.2/gems/sidekiq-3.2.1/lib/sidekiq/cli.rb:49:in `run'
/home/anton/.rvm/gems/ruby-2.1.2/gems/sidekiq-3.2.1/bin/sidekiq:8:in `<top (required)>'
/home/anton/.rvm/gems/ruby-2.1.2/bin/sidekiq:23:in `load'
/home/anton/.rvm/gems/ruby-2.1.2/bin/sidekiq:23:in `<main>'
2014-07-15T15:20:59.882Z 10491 TID-aemg8 DEBUG: Terminating 4 actors...

gitolite log

2014-07-15.18:19:35     9520    ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.18:19:35     9520            system,gitolite,info
2014-07-15.18:19:35     9520            system,/home/git/bin/commands/info
2014-07-15.18:19:36     9792    ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.18:19:36     9792            system,gitolite,info
2014-07-15.18:19:36     9792            system,/home/git/bin/commands/info
2014-07-15.18:20:07     9850    ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.18:20:07     9850            system,gitolite,info
2014-07-15.18:20:07     9850            system,/home/git/bin/commands/info
2014-07-15.18:20:08     10074   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.18:20:08     10074           system,gitolite,info
2014-07-15.18:20:08     10074           system,/home/git/bin/commands/info
2014-07-15.18:20:14     10137   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.18:20:14     10137           system,gitolite,info
2014-07-15.18:20:14     10137           system,/home/git/bin/commands/info
2014-07-15.18:20:15     10360   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.18:20:15     10360           system,gitolite,info
2014-07-15.18:20:15     10360           system,/home/git/bin/commands/info
2014-07-15.18:21:12     10560   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.18:21:12     10560           system,gitolite,info
2014-07-15.18:21:12     10560           system,/home/git/bin/commands/info
2014-07-15.18:21:13     10783   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=info        FROM=127.0.0.1
2014-07-15.18:21:13     10783           system,gitolite,info
2014-07-15.18:21:13     10783           system,/home/git/bin/commands/info

and this time i get kind of new file .lock in /tmp/redmine_git_hosting/git/gitolite-admin.git this file is empty size 0.

n-rodriguez commented 10 years ago

and this time i get kind of new file .lock in /tmp/redmine_git_hosting/git/gitolite-admin.git this file is empty size 0.

This is normal. The lock file is here to prevent conccurent modifications of the file.

But there's something wrong in your gem install :

WARN: Unresolved specs during Gem::Specification.reset:
      rake (>= 0.8.7)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Could not find codeclimate-test-reporter-0.3.0 in any of the sources

You should rebuild your gemset with : bundle install --without development test

n-rodriguez commented 10 years ago

This is also weird :

Rugged::NetworkError (This transport isn't implemented. Sorry):
  rugged (0.21.0) lib/rugged/repository.rb:217:in `push'
  rugged (0.21.0) lib/rugged/repository.rb:217:in `push'

You should rebuild your gemset with : bundle install --without development test.

oliverguenther commented 10 years ago

This error occurs when building libgit2/rugged without the ssh2 library present. You'll have to rebuild with libssh2(-dev) present.

See also: https://github.com/libgit2/rugged/issues/299

AntonPyrkh commented 10 years ago

Thanks, that's helped me on my local machine, i'll try it on server and will write answer.

AntonPyrkh commented 10 years ago

on server i get following error in log/worker_redmine_git_hosting.log

2014-07-16T08:49:19.543Z 17092 TID-enxpk GithostingShellWorker JID-b807a824bbf155d3908db27c INFO: start
2014-07-16T08:49:19.544Z 17092 TID-enxpk GithostingShellWorker JID-b807a824bbf155d3908db27c INFO: add_repository | 3 | {"create_readme_file"=>true}
2014-07-16T08:49:22.420Z 17092 TID-enxpk GithostingShellWorker JID-b807a824bbf155d3908db27c INFO: fail: 2.877 sec
2014-07-16T08:49:22.423Z 17092 TID-enxpk WARN: {"retry"=>false, "queue"=>"git_hosting", "class"=>"GithostingShellWorker", "args"=>["add_repository", 3, {"create_readme_file"=>true}], "jid"=>"b807a824bbf155d3908db27c", "enqueued_at"=>1405500559.53558}
2014-07-16T08:49:22.423Z 17092 TID-enxpk WARN: Cannot push missing reference
2014-07-16T08:49:22.423Z 17092 TID-enxpk WARN: /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/rugged-0.21.0/lib/rugged/repository.rb:217:in `push'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/rugged-0.21.0/lib/rugged/repository.rb:217:in `push'
/home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:221:in `apply'
/home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:240:in `block in transaction'
/home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:335:in `block in get_lock'
/home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:331:in `open'
/home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:331:in `get_lock'
/home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:236:in `transaction'
/home/test/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper/repositories.rb:19:in `add_repository'
/home/test/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper.rb:653:in `block in update'
/home/test/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper.rb:651:in `each'
/home/test/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper.rb:651:in `update'
/home/test/redmine/plugins/redmine_git_hosting/app/workers/githosting_shell_worker.rb:8:in `perform'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/processor.rb:52:in `block (2 levels) in process'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:122:in `call'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:122:in `block in invoke'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/server/retry_jobs.rb:62:in `call'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/logging.rb:22:in `with_context'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:127:in `call'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:127:in `invoke'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/processor.rb:51:in `block in process'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/processor.rb:94:in `stats'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/processor.rb:50:in `process'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
/home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
2014-07-16T08:49:22.424Z 17092 TID-enxpk ERROR: Sidekiq::Processor crashed!
Rugged::ReferenceError: Cannot push missing reference
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/rugged-0.21.0/lib/rugged/repository.rb:217:in `push'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/rugged-0.21.0/lib/rugged/repository.rb:217:in `push'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:221:in `apply'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:240:in `block in transaction'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:335:in `block in get_lock'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:331:in `open'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:331:in `get_lock'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/bundler/gems/gitolite-rugged-0a45149bdd2d/lib/gitolite/gitolite_admin.rb:236:in `transaction'
        /home/test/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper/repositories.rb:19:in `add_repository'
        /home/test/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper.rb:653:in `block in update'
        /home/test/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper.rb:651:in `each'
        /home/test/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/gitolite_wrapper.rb:651:in `update'
        /home/test/redmine/plugins/redmine_git_hosting/app/workers/githosting_shell_worker.rb:8:in `perform'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/processor.rb:52:in `block (2 levels) in process'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:122:in `call'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:122:in `block in invoke'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/server/retry_jobs.rb:62:in `call'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/logging.rb:22:in `with_context'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/server/logging.rb:7:in `call'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:124:in `block in invoke'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:127:in `call'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/middleware/chain.rb:127:in `invoke'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/processor.rb:51:in `block in process'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/processor.rb:94:in `stats'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/sidekiq-3.2.1/lib/sidekiq/processor.rb:50:in `process'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
        /home/test/.rvm/gems/ruby-2.1.2@redmine/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'

i still using sidekiq, now on access tab on ssh and http server i set ip of my server, other settings same as was on local machine.

oliverguenther commented 10 years ago

Did you clone the gitolite-admin directory manually? I have not yet tested automatic checkout with the newer rugged bindings, It may well be that it doesn't create all necessary refs.

The relevant code is the following:

@repo.push('origin', ['refs/heads/master'], credentials: @credentials)

Thus, it tries to push to origin/master. Do these refs exist in your repo?

n-rodriguez commented 10 years ago

I think I get it, at least for the 0.7.x branch.

Which version of gitlab-grit is installed? I had the same issue today on my own production server :/

I've updated Redmine to the last release and, as usual, I removed the .rvm dir to rebuild the whole gemset. This has installed the last version of gitlab-grit which seems to have bugs. I had to create the .ssh/config file to be able to git push to Gitolite (Btw I use Sidekiq worker, I didn't push by hand).

Later I did others tests on the dev platform, and it seems that the 2.6.10 version does not behave like the previous ones : files are not git added so git commit and git push cannot work.

I've done some tests with the last version of gitlab-grit (2.7.0) and after some slight changes it now works properly :)

So :

Can you test with this new branch?

Edit (an hour after) : I've put the 0.7.6 branch on my own production server, and you know what? It works :)

AntonPyrkh commented 10 years ago

I've reinstalled plugin haveve switched to 0.7.6 than switched to new gemset, run bundle install. than i've checked versions, i get gitlab-grit 2.7.0 and jbox-gitolite 1.2.3 than steps to install plugin... Again set servers in access to my ip and sidekiq and init repos with readme. Run sidekiq. But i can't create repo...( logs: gitolite log

2014-07-17.07:53:25     14377   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=git-receive-pack '/gitolite-admin.git'      FROM=127.0.0.1
2014-07-17.07:53:25     14377   pre_git gitolite-admin  redmine_gitolite_admin_id_rsa   W       any     refs/.*
2014-07-17.07:53:25     14377           system,git,shell,-c,git-receive-pack '/home/git/repositories/gitolite-admin.git'
2014-07-17.07:53:25     14377   END
2014-07-17.07:53:27     14444   ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=git-upload-pack '/test_new_tag/again_test.git'      FROM=54.237.198.205
2014-07-17.07:53:27     14444           repo 'test_new_tag/again_test' missing
2014-07-17.07:53:27     14444   die     R any test_new_tag/again_test redmine_gitolite_admin_id_rsa DENIED by fallthru<<newline>>(or you mis-spelled the reponame)

gitolite log

2014-07-17 07:53:23 +0000 INFO [GitHosting] User 'admin' created a new repository 'test_new_tag/again_test'
2014-07-17 07:53:23 +0000 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-07-17 07:53:23 +0000 INFO [GitWorker] add_repository : repository 'test_new_tag/again_test' does not exist in Gitolite, create it ...
2014-07-17 07:53:23 +0000 INFO [GitWorker] add_repository : commiting to Gitolite...
2014-07-17 07:53:23 +0000 INFO [GitWorker] add_repository : let Gitolite create empty repository 'repositories/test_new_tag/again_test.git'
2014-07-17 07:53:23 +0000 INFO [GitWorker] add_repository : pushing to Gitolite...
2014-07-17 07:53:25 +0000 INFO [GitWorker] add_repository : done !
2014-07-17 07:53:25 +0000 INFO [GitWorker] Create README file for repository 'test_new_tag/again_test'
2014-07-17 07:53:27 +0000 ERROR [GitWorker] Error while creating README file for repository 'test_new_tag/again_test'
2014-07-17 07:53:27 +0000 ERROR [GitWorker] Command output : 'Cloning into '/tmp/d20140717-13400-ox021w'...
[GitWorker]  FATAL: R any test_new_tag/again_test redmine_gitolite_admin_id_rsa DENIED by fallthru
[GitWorker]  (or you mis-spelled the reponame)
[GitWorker]  fatal: Could not read from remote repository.
[GitWorker]  
[GitWorker]  Please make sure you have the correct access rights
[GitWorker]  and the repository exists.'
2014-07-17 07:53:27 +0000 ERROR [GitCache] Git exited with non-zero status : 128

worker log

2014-07-17T07:53:23.079Z 13400 TID-vqjrw GithostingShellWorker JID-f1b5c5f861046b3dd18f86af INFO: start
2014-07-17T07:53:23.080Z 13400 TID-vqjrw GithostingShellWorker JID-f1b5c5f861046b3dd18f86af INFO: add_repository | 5 | {"create_readme_file"=>true}
find: `repositories/test_new_tag/again_test.git/objects': No such file or directory
fatal: Not a git repository: 'repositories/test_new_tag/again_test.git'
2014-07-17T07:53:27.375Z 13400 TID-vqjrw GithostingShellWorker JID-f1b5c5f861046b3dd18f86af INFO: done: 4.296 sec

in folder /tmp/redmine_git_hosting/git/gitolite-admin.git i have only untracked file .lock As i installed all in new gemset i think i have no reason to reinstall rvm. Or should i reinstall it?

oliverguenther commented 10 years ago

The gitolite log indicates an error with your admin_id SSH key. This would be a gitolite configuration error.

Can you clone the gitolite repository manually using the following command? (Replace git and localhost with your own values if different)

ssh -i <path/to/redmine_gitolite_admin_id_rsa> git@localhost

If setup correctly, this should print something like:

hello <user>, this is git@opdev running gitolite3 v3.6-2-g2d5c690 on git 1.9.1

R W gitolite-admin
[ .... ]
Connection to localhost closed.
jhohertz commented 10 years ago

I seem to be running into issues, possibly related to all this... running 2.5.2 redmine with 0.7.6 plugin.

What I am seeing is, no errors, but the save/apply methods on the gitolite admin object seem to just not do anything... I see in the git_hosting.log file that it says it's doing everything as it should, commit and pushing the gitolite-admin repo back in, but it does not.

When I look at the checkout in the temp folder, I see that it:

1) Checked out fine 2) The plugin modified the files it wanted to just fine 3) The "git add" on the modified files were done 4) NO git commit was performed 5) NO git push was performed.

I think I could go manually run the commit/push and gitolite would setup things as it should, but this seems wrong to need to do.

Like I say, the logs say it thinks the commit/push is occurring, just the repo left in tmp folder reveals it's only doing half the job.

Any ideas?

n-rodriguez commented 10 years ago

Try with the 0.7.7 branch. It updates the jbox-gitolite gem to 1.2.5 version.

Logs should be a lot more verbose ;)

jhohertz commented 10 years ago

Ahhh, extra verbosity helps... my error I can see now quite clearly, but for the record, the "admin repo checks out, is updated, but never committed" issue for me arose from not having the user.name/user.email settings applied in my ~redmine/.gitconfig.

jhohertz commented 10 years ago

Hrmmmm. That's not all it is... not sure what is happening here.. but despite having the right stuff in .gitconfig, the log shows the error on commit, where it says "Please tell me who you are", and shows the syntax for the git config --global user.email "foo@foo.com" and the like.... It's all there and setup, so not sure what gives here....

n-rodriguez commented 10 years ago

Ahhh, extra verbosity helps... my error I can see now quite clearly, but for the record, the "admin repo checks out, is updated, but never committed" issue for me arose from not having the user.name/user.email settings applied in my ~redmine/.gitconfig.

Actually you don't need ~redmine/.gitconfig file. Set this within Redmine in Administration -> Redmine Git Hosting -> Global

jhohertz commented 10 years ago

Yeah, it seems redundant, I'll probably remove it, though the issue likely remains, why the --author flag on the commit, and that file, are both being ignored when the plugin tries to run the commit.

If I log into the redmine user, and manually run the command for the commit, it works just fine, so it has to be something about how the command is launched from the plugin, something in the environment (or not in the environment that should be...)

I just remembered the user's shell is not bash, so I might try setting that, see where it gets me.

n-rodriguez commented 10 years ago

I just remembered the user's shell is not bash, so I might try setting that, see where it gets me.

Interesting. What shell do you use?

jhohertz commented 10 years ago

Yep. I can confirm the Redmine user needs a bash shell, which gets me a little further along. Users can add ssh keys. Er I thought so, but though it seemed to work on the surface, with clean logs, i didn't actually, and the environment is has hit the error state again?

Running into something on repo creation now, it's more or less the same thing I ran into before, but I can't explain why this one fails, but the key-add worked...

So, stalled where it did before interacting with the gitolite-admin repo inspecting that:

redmine@ubuntu:/tmp/redmine_git_hosting/git/gitolite-admin.git$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   conf/gitolite.conf

But, oddly, I can't even get it to commit with the --author flag again:

redmine@ubuntu:/tmp/redmine_git_hosting/git/gitolite-admin.git$ git commit -a -m 'test commit' --author='Joe Hohertz <jhohertz@gmail.com>'

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <redmine@ubuntu.(none)>) not allowed

So it's not just the shell, though that seemed to help the other case.

Log-wise, from the git_hosting.log:

2014-07-22 18:49:12 -0400 INFO [GitWorker] add_repository : repository 'test-project' does not exist in Gitolite, create it ...
2014-07-22 18:49:12 -0400 INFO [GitWorker] add_repository : commiting to Gitolite...
2014-07-22 18:49:35 -0400 ERROR [GitCache] Git exited with non-zero status : 128

And in the production log, a stack trace from what looks like an unhandled case for the git error.

NoMethodError (undefined method `out' for #<Grit::Git::CommandFailed:0x00000008017ce8>):
  plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:115:in `rescue in gitolite_admin_repo_commit'
  ... and the rest of the stack omitted ....

I might be able to work around it by putting back a .gitconfig but that probably is counter to your intentions.

I'm baffled at why the --author flag is not helping here. It worked for me on manually running things before, it looks right when I do it manually, doesn't work here, was fixed for the ssh key section by switching to bash. Still on bash... same code path in the gitolite_admin.rb's save method as the ssh_key used. So, this really should work.

Maybe there is some other aspect of the user environment the plugin sets up after or I need to account for.... this line is worrying (yes, the rc file has the .* set for that parameter to enable hooks):

2014-07-22 17:57:48 -0400 ERROR [GitHosting] Problems to retrieve Gitolite hook parameters in Gitolite config

The test tab comes up clean for all hook related things. But it looks to be related to invoking a shell for git again. (Trying to fetch values from a .config file?)

I might have found a quirk of my config that could be making post-receive hooks angry, though not sure if that applies to this issue.... Will go eliminate it to be sure.

n-rodriguez commented 10 years ago

NoMethodError (undefined method out' for #<Grit::Git::CommandFailed:0x00000008017ce8>): plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:115:inrescue in gitolite_admin_repo_commit' ... and the rest of the stack omitted ..

This is normal... and my fault. The 0.7.7 branch depends on the futur release of gitlab-grit which is not yet released :/

I need this PR because when the git commit is done with nothing to commit (which happens 90% of the time), git exit with error but writes on the stdout : nothing to commit.

This PR catches the stdout so I can parse it later and determines if it's an error or not.

n-rodriguez commented 10 years ago

To keep on testing you can comment lines 115 and 117 in redmine_git_hosting/lib/redmine_gitolite/admin.rb.

Dragnell87 commented 10 years ago

There are any news on this, about a week ago and stil no success with this using ruby2.1.2 apache + passanger redmine 2.5.2 gitolite3 Git Hosting v0.7.7 everything looks ok, but the repos are not getting inicieted at all

n-rodriguez commented 10 years ago

Hi there! The new v0.7.7 is out. This new version now depends on :

https://jbox-web.github.io/redmine_git_hosting/howtos/index.html#step-by-step-upgrade

jekel commented 10 years ago

i have updated to v0.7.8 problem still exists