Skip to content

gitolite-admin doesn't sync anymore #207

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
redirect11 opened this issue Jun 1, 2014 · 25 comments
Closed

gitolite-admin doesn't sync anymore #207

redirect11 opened this issue Jun 1, 2014 · 25 comments
Assignees
Labels

Comments

@redirect11
Copy link

Hi, it's about two weeks that i can't update de redmine-gitolite repo anymore. When I try to add a user, no keys are created into REDMINE_ROOT/tmp/redmine_git_hosting/git/gitolite-admin.git/keydir. I tried to resync keys in the plugin option, but nothing happen. The plugin log only say: [GitHosting] User ****** has added a SSH key.

@n-rodriguez
Copy link
Contributor

Have you configured Gitolite to accept hooks?

root$ su - git
git$ vi (or nano) .gitolite.rc
## Look for GIT_CONFIG_KEYS and make it look like :
GIT_CONFIG_KEYS                 =>  '.*',
## then save and exit

@n-rodriguez n-rodriguez self-assigned this Jun 2, 2014
@redirect11
Copy link
Author

HI, i have gitolite version 2 and i already have the option set to:

$GL_GITCONFIG_KEYS = ".*";

@jekel
Copy link

jekel commented Jun 8, 2014

Have the same problem, no project changes goes to gitolite.conf
to resolve this issue i have to manualy run synchronization:

rake redmine_git_hosting:update_repositories RAILS_ENV=production

in the git_hosting.log it seem all ok. but in fact it is on, config file does not changes.

2014-06-08 21:35:27 +0400 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-06-08 21:35:27 +0400 INFO [GitWorker] update_members : repository 'api' exists in Gitolite, update it ...
2014-06-08 21:35:27 +0400 DEBUG [GitWorker] update_members : repository path 'repositories/api.git'
2014-06-08 21:35:27 +0400 INFO [GitWorker] update_members : commiting to Gitolite...
2014-06-08 21:35:27 +0400 INFO [GitWorker] update_members : pushing to Gitolite...
2014-06-08 21:35:31 +0400 INFO [GitWorker] update_members : done !
2014-06-08 21:35:31 +0400 DEBUG [GitWorker] update_members : lock released !

@n-rodriguez
Copy link
Contributor

@redirect11 : which version of the plugin / Redmine are you running?

@redirect11
Copy link
Author

Redmine: 2.5.0.stabile

Redmine git hosting: 0.7.3
Il 20/giu/2014 17:37 "Nicolas" [email protected] ha scritto:

@redirect11 https://github.com/redirect11 : which version of the plugin
/ Redmine are you running?


Reply to this email directly or view it on GitHub
#207 (comment)
.

@jekel
Copy link

jekel commented Jun 23, 2014

i have modified user access rights to projects -> removed him from developers
and gitolite config does not changes

RAILS_ENV=production rake redmine_git_hosting:update_repositories
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
Performing manual update_repositories operation...
Done!

does not help, in git_hosting.log it seems all id fine... but in reality - no :(

@n-rodriguez
Copy link
Contributor

Hi there! Any news? Do you still have the problem?
Can you check that Redmine user is the owner of the temp directory?

@CapNem0
Copy link

CapNem0 commented Jul 6, 2014

Probably i've found solultion to get fully working plugin. Two step

  1. copied SSH keys from plugin directory to Redmine user .ssh folder as user id_rsa and id_rsa.pub
  2. created .gitconfig file in a Redmine root directory

After that all work just fine.

Ubuntu 12.04.4
nginx with unicorn
RVM ruby
Redmine: 2.5.1
Plugin v0.7.5

@DerSvenD
Copy link

same problem here

installed on fresh debian jessie with

apache 2.4.9-2
ruby 2.1.0.1
redmine 2.5.1
plugin v0.7.5

all directories owned by user "redmine"
chown redmine: /etc/redmine -R
chown redmine: /usr/share/redmine -R
chown redmine: /var/lib/redmine -R
chown redmine: /var/log/redmine -R
chown redmine: /var/cache/redmine -R

the gitolite-admin.git is correct checked out under
/usr/share/redmine/tmp/redmine_git_hosting/git/gitolite-admin.git/
the user keys added and the gitolite.conf is changed.

but, the changes not commited and not pushed to gitolite server

if I change to user "redmine" and do the commit and push manually all is fine

@DerSvenD
Copy link

if I resync all projects, I get following error in the log

==> /usr/share/redmine/log/git_hosting/git_worker.log <==
2014-07-16 15:06:04 +0200 DEBUG [GitWorker] update_all_projects_forced : get lock !
2014-07-16 15:06:04 +0200 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-07-16 15:06:04 +0200 INFO [GitWorker] update_all_projects_forced : repository 'asdsd' does not exist in Gitolite, create it ...
2014-07-16 15:06:04 +0200 DEBUG [GitWorker] update_all_projects_forced : repository path 'repositories/asdsd.git'
2014-07-16 15:06:04 +0200 INFO [GitWorker] update_all_projects_forced : commiting to Gitolite... with message 'tescht'
**2014-07-16 15:06:04 +0200 ERROR [GitWorker] wrong number of arguments (2 for 0)**
2014-07-16 15:06:04 +0200 INFO [GitWorker] update_all_projects_forced : pushing to Gitolite...

@n-rodriguez
Copy link
Contributor

Hi everyone!

I think I finally get it! More details here.

In short : checkout the v0.7.6 branch and do a bundle install --without development test ;)

@n-rodriguez n-rodriguez added bug and removed question labels Jul 16, 2014
@DerSvenD
Copy link

very thanks! it works

@redirect11
Copy link
Author

Thanks. I'll try it asap

@n-rodriguez
Copy link
Contributor

@redirect11 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 ;)

@jekel
Copy link

jekel commented Jul 28, 2014

i have updated to 0.7.7 and have same issue, changing user access rights to the repo - does not change gitolite-admin config
in the git_hosting.log i can see:

2014-07-28 15:15:05 +0400 INFO [GitHosting] Membership changes on project 'project', update!
2014-07-28 15:15:05 +0400 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-07-28 15:15:05 +0400 INFO [GitWorker] update_members : repository 'project' exists in Gitolite, update it ...
2014-07-28 15:15:05 +0400 INFO [GitWorker] update_members : commiting to Gitolite...

on the 0.7.6 version log data was:

[GitWorker] : /usr/bin/git --git-dir=/tmp/redmine_git_hosting/git/gitolite-admin.git/.git --work-tree=/tmp/redmine_git_hosting/git/gitolite-admin.git commit -a -m update_members : mobot --author='Redmine Git Hosting <[email protected]>' | warning: unable to access '/root/.config/git/attributes': ???????? ? ???????
[GitWorker]
[GitWorker]*** Please tell me who you are.
[GitWorker]
[GitWorker]Run
[GitWorker]
[GitWorker]  git config --global user.email "[email protected]"
[GitWorker]  git config --global user.name "Your Name"
[GitWorker]
[GitWorker]to set your account's default identity.
[GitWorker]Omit --global to set the identity only in this repository.

why it tryes to access /root path? o_O

@n-rodriguez
Copy link
Contributor

Do you use passenger?

@jekel
Copy link

jekel commented Aug 1, 2014

Do you mean how redmine is running? - i'm using thin

@jekel
Copy link

jekel commented Aug 1, 2014

nothing changed:

2014-08-01 17:19:12 +0400 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-08-01 17:19:12 +0400 INFO [GitWorker] update_members : repository '...' exists in Gitolite, update it ...
2014-08-01 17:19:12 +0400 INFO [GitWorker] update_members : commiting to Gitolite...

may be you can suggest another way of running redmine+nginx?

@mrueg
Copy link

mrueg commented Aug 3, 2014

@n-rodriguez Can you please add 0.7.7 as a tag? I'd like to try it out, too. This way it is easier for my package manager.

@jekel
Copy link

jekel commented Aug 4, 2014

now after running rake redmine_git_hosting:update_repositories i have this error... :(

 ~/redmine $ rake redmine_git_hosting:update_repositories RAILS_ENV=production --trace
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
** Invoke redmine_git_hosting:update_repositories (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine_git_hosting:update_repositories
Performing manual update_repositories operation...
rake aborted!
undefined method `out' for #<Grit::Git::CommandFailed:0x0000000954f138>
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:115:in `rescue in gitolite_admin_repo_commit'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:112:in `gitolite_admin_repo_commit'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:106:in `block (2 levels) in do_update_projects'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:104:in `each'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:104:in `block in do_update_projects'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:176:in `block in wrapped_transaction'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:161:in `block in get_lock'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:156:in `open'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:156:in `get_lock'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:173:in `wrapped_transaction'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:103:in `do_update_projects'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:35:in `update_all_projects'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/shell.rb:63:in `handle_command'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/redmine_gitolite/git_hosting.rb:44:in `resync_gitolite'
/var/redmine/redmine-2.4.5/plugins/redmine_git_hosting/lib/tasks/redmine_git_hosting.rake:78:in `block (2 levels) in <top (required)>'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in execute'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/usr/lib64/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:149:in `invoke_task'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Tasks: TOP => redmine_git_hosting:update_repositories

@n-rodriguez
Copy link
Contributor

@jekel
Copy link

jekel commented Aug 28, 2014

@n-rodriguez it helped, but works only in manual sync from command line

@ohthehugemanatee
Copy link

I got this problem too, after months of it working just fine.

I made a manual change to my gitolite-admin repo to prune out some old duplicate keys that were causing a problem, and then removed redmine's /tmp/redmine_git_hosting directory. It was working just moments before when I added a key to a user. Now in the log, all the config tests pass just fine, but it looks like GitWorker never gets further than deciding on the config file. I've updated to 0.7.7 . Other versions:

  • redmine 2.5.1
  • jbox-gitolite 1.2.5
  • (rvm) ruby 2.1.2 , passenger ruby 2.0.0-p247
  • nginx 1.0.2
  • Ubuntu 12.04

Here's the debug output from my git_hosting.log upon visiting the config page and choosing to resync all keys:

2014-09-10 07:26:30 +0000 INFO [GitHosting] Forced resync of all ssh keys (43)...
2014-09-10 07:26:30 +0000 DEBUG [GitWorker] update_all_ssh_keys_forced : get lock !
2014-09-10 07:26:30 +0000 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-09-10 07:26:30 +0000 DEBUG [GitHosting] Testing if scripts directory '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/' is writeable ...
2014-09-10 07:26:30 +0000 DEBUG [GitHosting]  touch '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/writecheck' 2>&1
2014-09-10 07:26:31 +0000 DEBUG [GitHosting]  rm '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/writecheck' 2>&1
2014-09-10 07:26:31 +0000 DEBUG [GitHosting] Testing if scripts directory '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/' is writeable ...
2014-09-10 07:26:31 +0000 DEBUG [GitHosting]  touch '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/writecheck' 2>&1
2014-09-10 07:26:31 +0000 DEBUG [GitHosting]  rm '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/writecheck' 2>&1
2014-09-10 07:26:31 +0000 DEBUG [GitHosting] Getting Gitolite version...
2014-09-10 07:26:31 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/gitolite_admin_ssh git@localhost info 2>&1
2014-09-10 07:26:32 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_git_cmd_as_gitolite_user config -f .gitconfig --get-regexp redminegitolite 2>&1
2014-09-10 07:26:32 +0000 DEBUG [GitHosting] Testing if scripts directory '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/' is writeable ...
2014-09-10 07:26:32 +0000 DEBUG [GitHosting]  touch '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/writecheck' 2>&1
2014-09-10 07:26:32 +0000 DEBUG [GitHosting]  rm '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/writecheck' 2>&1
2014-09-10 07:26:32 +0000 DEBUG [GitHosting] Testing if temp directory '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/tmp/redmine_git_hosting/git/' is writeable ...
2014-09-10 07:26:32 +0000 DEBUG [GitHosting]  touch '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/tmp/redmine_git_hosting/git/writecheck' 2>&1
2014-09-10 07:26:32 +0000 DEBUG [GitHosting]  rm '/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/tmp/redmine_git_hosting/git/writecheck' 2>&1
2014-09-10 07:26:32 +0000 DEBUG [GitHosting]  sudo -V 2>&1 | head -n1 | sed 's/^.* //g' | sed 's/[a-z].*$//g' 2>&1
2014-09-10 07:26:33 +0000 INFO [GitHosting] Testing if Gitolite user 'git' can sudo to Redmine user 'redmine'...
2014-09-10 07:26:33 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user sudo -n -u redmine -i whoami 2>&1
2014-09-10 07:26:33 +0000 INFO [GitHosting] OK!
2014-09-10 07:26:33 +0000 INFO [GitHosting] Testing if Redmine user 'redmine' can sudo to Gitolite user 'git'...
2014-09-10 07:26:33 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user whoami 2>&1
2014-09-10 07:26:33 +0000 INFO [GitHosting] OK!
2014-09-10 07:26:33 +0000 DEBUG [GitHosting] Getting Gitolite version...
2014-09-10 07:26:33 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/gitolite_admin_ssh git@localhost info 2>&1
2014-09-10 07:26:35 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_git_cmd_as_gitolite_user config -f .gitconfig --get-regexp redminegitolite 2>&1
2014-09-10 07:26:35 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user test -r '~/.gitolite/hooks/common/post-receive.d' && echo 'yes' || echo 'no' 2>&1
2014-09-10 07:26:35 +0000 INFO [GitHosting] Global hook directory '~/.gitolite/hooks/common/post-receive.d' is already present, will not touch it !
2014-09-10 07:26:35 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user test -s '~/.gitolite/hooks/common/post-receive' && echo 'yes' || echo 'no' 2>&1
2014-09-10 07:26:35 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user cat '~/.gitolite/hooks/common/post-receive' 2>&1
2014-09-10 07:26:35 +0000 DEBUG [GitHosting] ["Digest for 'post-receive.redmine_gitolite.rb' hook : 694791b5dd416c5506e9a2fc01b52986"]
2014-09-10 07:26:35 +0000 INFO [GitHosting] Our 'post-receive.redmine_gitolite.rb' hook is already installed
2014-09-10 07:26:35 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user test -s '~/.gitolite/hooks/common/post-receive.d/git_multimail.py' && echo 'yes' || echo 'no' 2>&1
2014-09-10 07:26:35 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user cat '~/.gitolite/hooks/common/post-receive.d/git_multimail.py' 2>&1
2014-09-10 07:26:35 +0000 DEBUG [GitHosting] ["Digest for 'post-receive.git_multimail.py' hook : 9065ed84b0e3393005cf7ca212d50265"]
2014-09-10 07:26:35 +0000 INFO [GitHosting] Our 'post-receive.git_multimail.py' hook is already installed
2014-09-10 07:26:35 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user test -s '~/.gitolite/hooks/common/post-receive.d/mail_notifications' && echo 'yes' || echo 'no' 2>&1
2014-09-10 07:26:36 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user cat '~/.gitolite/hooks/common/post-receive.d/mail_notifications' 2>&1
2014-09-10 07:26:36 +0000 DEBUG [GitHosting] ["Digest for 'post-receive.mail_notifications.py' hook : 5dac882b132037d48ce9022bb8ad54e2"]
2014-09-10 07:26:36 +0000 INFO [GitHosting] Our 'post-receive.mail_notifications.py' hook is already installed
2014-09-10 07:26:36 +0000 INFO [GitHosting] Installing Redmine Gitolite mirroring SSH keys ...
2014-09-10 07:26:36 +0000 DEBUG [GitHosting] cat ''/var/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa'' | /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user 'cat > ~/.ssh/redmine_gitolite_admin_id_rsa_mirroring' 2>&1
2014-09-10 07:26:36 +0000 DEBUG [GitHosting] cat ''/var/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa.pub'' | /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user 'cat > ~/.ssh/redmine_gitolite_admin_id_rsa_mirroring.pub' 2>&1
2014-09-10 07:26:36 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user 'chmod 600 ~/.ssh/redmine_gitolite_admin_id_rsa_mirroring' 2>&1
2014-09-10 07:26:36 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user 'chmod 644 ~/.ssh/redmine_gitolite_admin_id_rsa_mirroring.pub' 2>&1
2014-09-10 07:26:36 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user 'cd ~ && pwd' 2>&1
2014-09-10 07:26:36 +0000 DEBUG [GitHosting] echo '#!/bin/sh' | /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user 'cat > ~/.ssh/run_gitolite_admin_ssh' 2>&1
2014-09-10 07:26:37 +0000 DEBUG [GitHosting] echo 'exec ssh -T -o BatchMode=yes -o StrictHostKeyChecking=no -i /home/git/.ssh/redmine_gitolite_admin_id_rsa_mirroring "$@"' | /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user 'cat >> ~/.ssh/run_gitolite_admin_ssh' 2>&1
2014-09-10 07:26:37 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user 'chmod 700 ~/.ssh/run_gitolite_admin_ssh' 2>&1
2014-09-10 07:26:37 +0000 INFO [GitHosting] Done !
2014-09-10 07:26:37 +0000 DEBUG [GitHosting] Getting Gitolite version...
2014-09-10 07:26:37 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/gitolite_admin_ssh git@localhost info 2>&1
2014-09-10 07:26:38 +0000 DEBUG [GitHosting] Getting Gitolite banner...
2014-09-10 07:26:38 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/gitolite_admin_ssh git@localhost info 2>&1
2014-09-10 07:26:39 +0000 DEBUG [GitHosting] /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/bin/run_shell_cmd_as_gitolite_user test -r 'recycle_bin/' && echo 'yes' || echo 'no' 2>&1

Everything after line 3 is just the normal output of visiting the config page. In earlier runs (without debug turned on), GitWorker showed me how it was cloning, adding, and pushing. Now it just doesn't fire. I've tried:

  • simlinking redmine's keys to ~redmine/.ssh

  • having no keys in ~redmine/.ssh

  • touching ~redmine/.gitconfig

  • removing the entire redmine/tmp/redmine_git_hosting directory (it gets recreated with a fresh clone, no problem.... but I notice that the tmp/redmine_git_hosting/git/redmine_git_hosting_lock file persists. I noticed that before so maybe it's nothing.

    If I manually run "bundle exec rake redmine_git_hosting:update_repositories RAILS_ENV=production", I get:

[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
Performing manual update_repositories operation...
/usr/bin/git --git-dir=/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/tmp/redmine_git_hosting/git/gitolite-admin.git/.git --work-tree=/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/tmp/redmine_git_hosting/git/gitolite-admin.git add /mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/tmp/redmine_git_hosting/git/gitolite-admin.git/conf/gitolite.conf


/usr/bin/git --git-dir=/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/tmp/redmine_git_hosting/git/gitolite-admin.git/.git --work-tree=/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/tmp/redmine_git_hosting/git/gitolite-admin.git commit -a -m 'update_all_projects : project1' --author='Redmine Git Hosting <[email protected]>'
# On branch master
nothing to commit (working directory clean)


rake aborted!
undefined method `out' for #<Grit::Git::CommandFailed:0xb557408>
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:115:in `rescue in gitolite_admin_repo_commit'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:112:in `gitolite_admin_repo_commit'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:106:in `block (2 levels) in do_update_projects'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:104:in `each'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:104:in `block in do_update_projects'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:176:in `block in wrapped_transaction'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:161:in `block in get_lock'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:156:in `open'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:156:in `get_lock'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:173:in `wrapped_transaction'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:103:in `do_update_projects'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_projects.rb:35:in `update_all_projects'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/shell.rb:63:in `handle_command'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/redmine_gitolite/git_hosting.rb:44:in `resync_gitolite'
/mnt/ebs/www/redmine.foo.bar/redmine-2.5.1/plugins/redmine_git_hosting/lib/tasks/redmine_git_hosting.rake:78:in `block (2 levels) in <top (required)>'
Tasks: TOP => redmine_git_hosting:update_repositories
(See full trace by running task with --trace)

Any advice? Any more information I can give you?

EDIT: I looked into the RW+ error on that manual run, and it was a syntax mistake I made in gitolite.conf. Fixed it and updated the output in place.

@n-rodriguez
Copy link
Contributor

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

  • jbox-gitolite 1.2.6
  • gitlab-grit 2.7.1

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

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

7 participants