Skip to content
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

Migrate to redmine 2.6.5 to 3.0.3 and git hosting from 0.7.10 to 1.1.0 fails #459

Closed
nicesw123 opened this issue Jun 17, 2015 · 12 comments
Closed
Assignees
Labels
Milestone

Comments

@nicesw123
Copy link

Hi,

I'm trying redmine_git_hosting:migrate_to_v1

It starts out alright; but then gives some errors (see below)

Is the reason maby, that I'm migrating both redmine and githosting ?
Maby I should keep redmine on 2.6.5 and migrate githosting alone ???

Thanks for tips.

rvm_usr@infraserv2:/srv/redmine0/redmine$ bundle exec rake redmine_git_hosting:migrate_to_v1 RAILS_ENV=production

old_name : 2011072600000-redmine_git_hosting
new_name : 20110726000000-redmine_git_hosting
Already migrated, pass!

old_name : 2011080700000-redmine_git_hosting
new_name : 20110807000000-redmine_git_hosting
Already migrated, pass!

old_name : 2011081300000-redmine_git_hosting
new_name : 20110813000000-redmine_git_hosting
Already migrated, pass!

old_name : 2011081700000-redmine_git_hosting
new_name : 20110817000000-redmine_git_hosting
Already migrated, pass!

old_name : 2012052100000-redmine_git_hosting
new_name : 20120521000000-redmine_git_hosting
Already migrated, pass!

old_name : 2012052100001-redmine_git_hosting
new_name : 20120521000010-redmine_git_hosting
Already migrated, pass!

old_name : 2012052200000-redmine_git_hosting
new_name : 20120522000000-redmine_git_hosting
Already migrated, pass!

Done!
Migrating redmine_git_hosting (Redmine Git Hosting Plugin)...
== 20140423224900 ConvertBoolean: migrating ===================================
-- add_column(:gitolite_public_keys, :active_temp, :boolean, {:default=>true, :after=>:key})
   -> 0.0719s
Update!
Update!
Update!
-- remove_column(:gitolite_public_keys, :active)
   -> 0.0488s
-- rename_column(:gitolite_public_keys, :active_temp, :active)
   -> 0.0322s
-- add_column(:gitolite_public_keys, :delete_when_unused_temp, :boolean, {:default=>true, :after=>:active})
   -> 0.0109s
Update!
Update!
Update!
-- remove_column(:gitolite_public_keys, :delete_when_unused)
   -> 0.0341s
-- rename_column(:gitolite_public_keys, :delete_when_unused_temp, :delete_when_unused)
   -> 0.0236s
-- add_column(:repository_git_extras, :git_daemon_temp, :boolean, {:default=>true, :after=>:git_daemon})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Duplicate column name 'git_daemon_temp': ALTER TABLE `repository_git_extras` ADD `git_daemon_temp` tinyint(1) DEFAULT 1 AFTER `git_daemon`/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `query'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `block in execute'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `execute'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/mysql2_adapter.rb:231:in `execute'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:393:in `add_column'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:662:in `block in method_missing'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:632:in `block in say_with_time'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:632:in `say_with_time'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:652:in `method_missing'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:417:in `method_missing'
/srv/redmine0/redmine-3.0.3/plugins/redmine_git_hosting/db/migrate/20140423224900_convert_boolean.rb:37:in `up'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:569:in `up'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:609:in `exec_migration'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:590:in `block (2 levels) in migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:589:in `block in migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:588:in `migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:765:in `migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:1043:in `ddl_transaction'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:956:in `block in migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:952:in `each'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:952:in `migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in `up'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:798:in `migrate'
/srv/redmine0/redmine-3.0.3/lib/redmine/plugin.rb:474:in `migrate_plugin'
/srv/redmine0/redmine-3.0.3/lib/redmine/plugin.rb:446:in `migrate'
/srv/redmine0/redmine-3.0.3/lib/redmine/plugin.rb:457:in `migrate'
/srv/redmine0/redmine-3.0.3/lib/tasks/redmine.rake:127:in `block (3 levels) in <top (required)>'
/srv/redmine0/redmine-3.0.3/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:156:in `block (2 levels) in <top (required)>'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
ActiveRecord::StatementInvalid: Mysql2::Error: Duplicate column name 'git_daemon_temp': ALTER TABLE `repository_git_extras` ADD `git_daemon_temp` tinyint(1) DEFAULT 1 AFTER `git_daemon`
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `query'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `block in execute'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `execute'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/mysql2_adapter.rb:231:in `execute'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:393:in `add_column'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:662:in `block in method_missing'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:632:in `block in say_with_time'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:632:in `say_with_time'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:652:in `method_missing'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:417:in `method_missing'
/srv/redmine0/redmine-3.0.3/plugins/redmine_git_hosting/db/migrate/20140423224900_convert_boolean.rb:37:in `up'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:569:in `up'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:609:in `exec_migration'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:590:in `block (2 levels) in migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:589:in `block in migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:588:in `migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:765:in `migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:1043:in `ddl_transaction'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:956:in `block in migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:952:in `each'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:952:in `migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in `up'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:798:in `migrate'
/srv/redmine0/redmine-3.0.3/lib/redmine/plugin.rb:474:in `migrate_plugin'
/srv/redmine0/redmine-3.0.3/lib/redmine/plugin.rb:446:in `migrate'
/srv/redmine0/redmine-3.0.3/lib/redmine/plugin.rb:457:in `migrate'
/srv/redmine0/redmine-3.0.3/lib/tasks/redmine.rake:127:in `block (3 levels) in <top (required)>'
/srv/redmine0/redmine-3.0.3/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:156:in `block (2 levels) in <top (required)>'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
Mysql2::Error: Duplicate column name 'git_daemon_temp'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `query'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `block in execute'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `execute'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/mysql2_adapter.rb:231:in `execute'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:393:in `add_column'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:662:in `block in method_missing'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:632:in `block in say_with_time'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:632:in `say_with_time'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:652:in `method_missing'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:417:in `method_missing'
/srv/redmine0/redmine-3.0.3/plugins/redmine_git_hosting/db/migrate/20140423224900_convert_boolean.rb:37:in `up'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:569:in `up'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:609:in `exec_migration'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:590:in `block (2 levels) in migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:589:in `block in migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:588:in `migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:765:in `migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:1043:in `ddl_transaction'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:956:in `block in migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:952:in `each'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:952:in `migrate'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in `up'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/migration.rb:798:in `migrate'
/srv/redmine0/redmine-3.0.3/lib/redmine/plugin.rb:474:in `migrate_plugin'
/srv/redmine0/redmine-3.0.3/lib/redmine/plugin.rb:446:in `migrate'
/srv/redmine0/redmine-3.0.3/lib/redmine/plugin.rb:457:in `migrate'
/srv/redmine0/redmine-3.0.3/lib/tasks/redmine.rake:127:in `block (3 levels) in <top (required)>'
/srv/redmine0/redmine-3.0.3/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:156:in `block (2 levels) in <top (required)>'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/srv/rvm_usr/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine:plugins:migrate
(See full trace by running task with --trace)
rvm_usr@infraserv2:/srv/redmine0/redmine$ 
@n-rodriguez
Copy link
Contributor

Is the reason maybe, that I'm migrating both redmine and githosting ?
Maybe I should keep redmine on 2.6.5 and migrate githosting alone ???

It's always better to upgrade only one thing at a time :)
I think one of your try has failed letting behind a temporary column in the database thus the error.
You can remove this column and replay the migration task, it should pass.

@n-rodriguez n-rodriguez self-assigned this Jun 19, 2015
@n-rodriguez
Copy link
Contributor

Any news?

@jdpf
Copy link

jdpf commented Aug 7, 2015

Hey, +1 here for me too. Very similar errors when migrating redmine_git_hosting from 0.7.7 to 1.1.1. To test this I reset the database to a known-working state backup under the following configuration:

Redmine 2.5.2.stable

Default administrator account changed   
Attachments directory writable  
Plugin assets directory writable    
RMagick available (optional)    
ImageMagick convert available (optional)    

Environment:
  Redmine version                2.5.2.stable
  Ruby version                   1.9.3-p194 (2012-04-20) [x86_64-linux]
  Rails version                  3.2.19
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.6.17
  Mercurial                      2.2.2
  Cvs                            1.12.13
  Bazaar                         2.6.0
  Git                            1.7.10.4
  Filesystem                     
Redmine plugins:
  redmine_backlogs               v1.0.6
  redmine_bootstrap_kit          0.1
  redmine_checkout               0.6-BETA
  redmine_git_hosting            0.7.7
  redmine_identifier             0.0.2
  redmine_timesheet_plugin       0.7.0

The upgrade and migrations for Redmine from 2.5x to 3.1 stable work just fine. As outlined here: http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

All plugins are temporarily moved away when performing this upgrade. Here is the summary of what is performed:

# systemctl stop apache2.service
$ bundle install
$ git branch -a
$ rm config/initializers/secret_token.rb 
$ bundle exec rake generate_secret_token
$ bundle update
$ bundle exec rake db:migrate RAILS_ENV=production
$ bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
$ systemctl start apache2.service

Test Redmine application out and it works, just fine... seems speedier too!

Now time to update redmine_git_hosting:

# systemctl stop apache2.service
# apt-get install libssh2-1 libssh2-1-dev cmake libgpg-error-dev
{already installed}
{locales already configured}
$ cd REDMINE_ROOT/plugins/redmine_git_hosting
$ git checkout 0.7.10
$ git branch -a
* (detached from 0.7.10)
$ cd REDMINE_ROOT

Attempting a bundle install here leads to:

Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.
Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.

[!] There was an error parsing `Gemfile`: 
[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
You specified: redcarpet (~> 3.1.2) and redcarpet (~> 2.3.0). Bundler cannot continue.

 #  from /opt/redmine/redmine/plugins/redmine_git_hosting/Gemfile:7
 #  -------------------------------------------
 #  gem 'github-markup'
 >  gem 'redcarpet', '~> 2.3.0'
 #  gem 'RedCloth'
 #  -------------------------------------------
. Bundler cannot continue.

 #  from /opt/redmine/redmine/Gemfile:110
 #  -------------------------------------------
 #  Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
 >    eval_gemfile file
 #  end
 #  -------------------------------------------


I comment out redcarpet line in the Gemfile. Then run bundle update followed by bundle install. Now attempt to run the rake task.

$ bundle exec rake redmine_git_hosting:prepare_migration_to_v1 RAILS_ENV=production

Which happily succeeds! This install has several hundred ssh keys.

Note that Redmine 3.x is apparently incompatible with v0.7.10. I do not yet start the application server...

cd REDMINE_ROOT/plugins/redmine_git_hosting
$ git checkout -- Gemfile
$ git checkout 1.1.1
Previous HEAD position was f76d124... Fix https://github.com/jbox-web/redmine_git_hosting/issues/324
HEAD is now at c1bc530... Fix display of git_annex urls
$ git branch -a
* (detached from 1.1.1)
$ cd ../redmine_bootstrap_kit/
$ git branch -a
* (detached from 0.2.3)
$ cd REDMINE_ROOT
$ bundle install

Up to this point things work. Note that the redmine_gitolite_admin_id_rsa keys are symlinked to redmine_git_hosting/ssh_keys.

Now run the migration task...

$ bundle exec rake redmine_git_hosting:migrate_to_v1 RAILS_ENV=production

Works halfway before dropping out with:

old_name : 2011072600000-redmine_git_hosting
new_name : 20110726000000-redmine_git_hosting

old_name : 2011080700000-redmine_git_hosting
new_name : 20110807000000-redmine_git_hosting

old_name : 2011081300000-redmine_git_hosting
new_name : 20110813000000-redmine_git_hosting

old_name : 2011081700000-redmine_git_hosting
new_name : 20110817000000-redmine_git_hosting

old_name : 2012052100000-redmine_git_hosting
new_name : 20120521000000-redmine_git_hosting

old_name : 2012052100001-redmine_git_hosting
new_name : 20120521000010-redmine_git_hosting

old_name : 2012052200000-redmine_git_hosting
new_name : 20120522000000-redmine_git_hosting

Done!
Migrating redmine_git_hosting (Redmine Git Hosting Plugin)...
== 20140417004100 EnforceModelsConstraints: migrating =========================
-- change_column(:git_caches, :command_output, :binary, {:limit=>16777216})
   -> 0.0062s
-- remove_column(:repository_mirrors, :created_at)
   -> 0.0030s
-- remove_column(:repository_mirrors, :updated_at)
   -> 0.0025s
-- remove_column(:repository_post_receive_urls, :created_at)
   -> 0.0020s
-- remove_column(:repository_post_receive_urls, :updated_at)
   -> 0.0022s
== 20140417004100 EnforceModelsConstraints: migrated (0.0165s) ================

== 20140423224900 ConvertBoolean: migrating ===================================
-- add_column(:gitolite_public_keys, :active_temp, :boolean, {:default=>true, :after=>
:key})
   -> 0.0362s
Update!

<snip>

Update!
Update!
-- remove_column(:gitolite_public_keys, :active)
   -> 0.0066s
-- rename_column(:gitolite_public_keys, :active_temp, :active)
   -> 0.0084s
-- add_column(:gitolite_public_keys, :delete_when_unused_temp, :boolean, {:default=>tr
ue, :after=>:active})
   -> 0.0060s
Update!

<snip>

Update!
-- remove_column(:gitolite_public_keys, :delete_when_unused)
   -> 0.0060s
-- rename_column(:gitolite_public_keys, :delete_when_unused_temp, :delete_when_unused)
   -> 0.0103s
-- add_column(:repository_git_extras, :git_daemon_temp, :boolean, {:default=>true, :after=>:git_daemon})
   -> 0.0057s
Update!
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

undefined method `urls_order' for #<RepositoryGitExtra:0x000000080c9970>/var/lib/gems/2.1.0/gems/activemodel-4.2.3/lib/active_model/attribute_methods.rb:433:in `method_missing'
/opt/redmine/redmine/plugins/redmine_git_hosting/app/models/repository_git_extra.rb:137:in `add_url'
/opt/redmine/redmine/plugins/redmine_git_hosting/app/models/repository_git_extra.rb:94:in `check_ssh_url'
/opt/redmine/redmine/plugins/redmine_git_hosting/app/models/repository_git_extra.rb:82:in `check_urls_order_consistency'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:430:in `block in make_lambda'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:162:in `call'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:162:in `block in halting'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `call'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `block in call'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `each'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `call'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in `run_callbacks'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/callbacks.rb:302:in `create_or_update'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/persistence.rb:120:in `save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/validations.rb:37:in `save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:286:in `block (2 levels) in save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:286:in `block in save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:301:in `rollback_active_record_state!'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:285:in `save'
/opt/redmine/redmine/plugins/redmine_git_hosting/db/migrate/20140423224900_convert_boolean.rb:46:in `block in up'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:46:in `each'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:46:in `each'
/opt/redmine/redmine/plugins/redmine_git_hosting/db/migrate/20140423224900_convert_boolean.rb:39:in `up'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:568:in `up'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:608:in `exec_migration'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1042:in `ddl_transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/opt/redmine/redmine/lib/redmine/plugin.rb:481:in `migrate_plugin'
/opt/redmine/redmine/lib/redmine/plugin.rb:453:in `migrate'
/opt/redmine/redmine/lib/redmine/plugin.rb:464:in `migrate'
/opt/redmine/redmine/lib/tasks/redmine.rake:127:in `block (3 levels) in <top (required)>'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:156:in `block (2 levels) in <top (required)>'
NoMethodError: undefined method `urls_order' for #<RepositoryGitExtra:0x000000080c9970>
/var/lib/gems/2.1.0/gems/activemodel-4.2.3/lib/active_model/attribute_methods.rb:433:in `method_missing'
/opt/redmine/redmine/plugins/redmine_git_hosting/app/models/repository_git_extra.rb:137:in `add_url'
/opt/redmine/redmine/plugins/redmine_git_hosting/app/models/repository_git_extra.rb:94:in `check_ssh_url'
/opt/redmine/redmine/plugins/redmine_git_hosting/app/models/repository_git_extra.rb:82:in `check_urls_order_consistency'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:430:in `block in make_lambda'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:162:in `call'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:162:in `block in halting'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `call'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `block in call'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `each'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `call'
/var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in `run_callbacks'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/callbacks.rb:302:in `create_or_update'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/persistence.rb:120:in `save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/validations.rb:37:in `save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:286:in `block (2 levels) in save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:286:in `block in save'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:301:in `rollback_active_record_state!'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:285:in `save'
/opt/redmine/redmine/plugins/redmine_git_hosting/db/migrate/20140423224900_convert_boolean.rb:46:in `block in up'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:46:in `each'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:46:in `each'
/opt/redmine/redmine/plugins/redmine_git_hosting/db/migrate/20140423224900_convert_boolean.rb:39:in `up'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:568:in `up'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:608:in `exec_migration'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1042:in `ddl_transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/opt/redmine/redmine/lib/redmine/plugin.rb:481:in `migrate_plugin'
/opt/redmine/redmine/lib/redmine/plugin.rb:453:in `migrate'
/opt/redmine/redmine/lib/redmine/plugin.rb:464:in `migrate'
/opt/redmine/redmine/lib/tasks/redmine.rake:127:in `block (3 levels) in <top (required)>'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:156:in `block (2 levels) in <top (required)>'
Tasks: TOP => redmine:plugins:migrate
(See full trace by running task with --trace)

This is entirely repeatable for me.

Any hints?

@n-rodriguez
Copy link
Contributor

@jdpf
Copy link

jdpf commented Aug 11, 2015

That's AWESOME!

The fix_migrations branch worked beautifully!

Thank you!

@n-rodriguez n-rodriguez added bug and removed question labels Aug 11, 2015
@n-rodriguez
Copy link
Contributor

You're welcome :) The patch will be merged in the next release.

@jdpf
Copy link

jdpf commented Aug 17, 2015

hi

I hate to revive this issue but....

Now, on a different system, I cannot progress past the prepare migrations! What?? I am in the right version...

redmine/plugins/redmine_git_hosting$ git branch -a
* (detached from 0.7.10)

And then:

/redmine$ bundle exec rake redmine_git_hosting:prepare_migration_to_v1 RAILS_ENV=production
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/tasks/selinux.rake:52: warning: class variable access from toplevel
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/tasks/selinux.rake:283: warning: class variable access from toplevel
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/tasks/selinux.rake:284: warning: class variable access from toplevel
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/tasks/selinux.rake:285: warning: class variable access from toplevel

Delete SSH keys in Gitolite (they will be recreated later)

  - Delete SSH key redmine_user@redmine_1408297417_321946
rake aborted!
NoMethodError: undefined method `ssh_keys' for nil:NilClass
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_users_helper.rb:49:in `remove_inactive_key'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_users_helper.rb:12:in `handle_ssh_key_delete'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_users.rb:45:in `block in delete_ssh_keys'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:179:in `block in wrapped_transaction'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:164:in `block in get_lock'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:159:in `open'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:159:in `get_lock'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin.rb:176:in `wrapped_transaction'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_users.rb:44:in `delete_ssh_keys'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/admin_users.rb:22:in `delete_ssh_key'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/shell.rb:66:in `handle_command'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/redmine_gitolite/git_hosting.rb:44:in `resync_gitolite'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:18:in `block (4 levels) in <top (required)>'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:46:in `each'
/var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:46:in `each'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:10:in `block (3 levels) in <top (required)>'
/opt/redmine/redmine/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:29:in `block (2 levels) in <top (required)>'
Tasks: TOP => redmine_git_hosting:migration_tools:delete_ssh_key
(See full trace by running task with --trace)

This is perplexing. In trying to address this issue, I migrated gitolite to version 3. No win there.

Any hints?

Thanks!

@jdpf
Copy link

jdpf commented Aug 18, 2015

While I still have no idea how those errors came up, I 'fixed' them by re-cloning the entirety of redmine, and copying the repos from my working configuration. Possibly not a very helpful strategy to others here, I guess, but it worked.

@oliwel
Copy link

oliwel commented Aug 20, 2015

I get the same error even with the fix_migrate branch =(

@n-rodriguez
Copy link
Contributor

NoMethodError: undefined method `ssh_keys' for nil:NilClass

The error comes from here : https://github.com/jbox-web/redmine_git_hosting/blob/v0.7.x/lib/redmine_gitolite/admin_users_helper.rb#L49

There is something wrong with the Gitolite Admin repo. The @gitolite_admin object is nil which means you should check your SSH keys path. In other words : be sure that the plugin works perfectly in 0.7 branch before doing the migration.

@oliwel
Copy link

oliwel commented Aug 25, 2015

I finally decided to uninstall the plugin, reinstall it from scratch and recreate the repos. It seems that the origin of this problem was a broken gitolite setup (manual install interfering with the ones installed by debian)

@gituser
Copy link

gituser commented Apr 12, 2017

I'm having similar problem.

What I did:

  1. I've migrated the plugin from 0.7.8 to 0.7.10 and did all steps in the documentation. Checked everything works. NOTE: redmine version is 2.5.x.

  2. Now I've ran bundle exec rake redmine_git_hosting:prepare_migration_to_v1 RAILS_ENV=production everything worked perfectly all keys were deleted fine

  3. So upgrading redmine-git-hosting to 1.2.2 isn't possible if you don't upgrade redmine as well. So I've upgraded my redmine setup to 3.3.3.

  4. I've ran bundle exec rake db:migrate RAILS_ENV=production to make sure everything migrated to the new redmine properly.

  5. And now I'm having trouble running bundle exec rake redmine_git_hosting:migrate_to_v1 RAILS_ENV=production in the new setup:

old_name : 2011072600000-redmine_git_hosting
new_name : 20110726000000-redmine_git_hosting
Already migrated, pass!

old_name : 2011080700000-redmine_git_hosting
new_name : 20110807000000-redmine_git_hosting
Already migrated, pass!

old_name : 2011081300000-redmine_git_hosting
new_name : 20110813000000-redmine_git_hosting
Already migrated, pass!

old_name : 2011081700000-redmine_git_hosting
new_name : 20110817000000-redmine_git_hosting
Already migrated, pass!

old_name : 2012052100000-redmine_git_hosting
new_name : 20120521000000-redmine_git_hosting
Already migrated, pass!

old_name : 2012052100001-redmine_git_hosting
new_name : 20120521000010-redmine_git_hosting
Already migrated, pass!

old_name : 2012052200000-redmine_git_hosting
new_name : 20120522000000-redmine_git_hosting
Already migrated, pass!

Done!
Migrating redmine_git_hosting (Redmine Git Hosting Plugin)...

Delete SSH keys in Gitolite and reset identifier :

  - Delete SSH key redmine_USER@redmine_1492014855_893392
rake aborted!
Rugged::InvalidError: Failed to parse signature - Neither `name` nor `email` should contain angle brackets chars.
/var/www/.rvm/gems/ruby-2.3.3/bundler/gems/gitolite-rugged-551741d1df06/lib/gitolite/gitolite_admin.rb:281:in `create'
/var/www/.rvm/gems/ruby-2.3.3/bundler/gems/gitolite-rugged-551741d1df06/lib/gitolite/gitolite_admin.rb:281:in `update'
/var/www/.rvm/gems/ruby-2.3.3/bundler/gems/gitolite-rugged-551741d1df06/lib/gitolite/gitolite_admin.rb:315:in `set_repo'
/var/www/.rvm/gems/ruby-2.3.3/bundler/gems/gitolite-rugged-551741d1df06/lib/gitolite/gitolite_admin.rb:64:in `initialize'
/var/www/redmine-3.3/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:68:in `new'
/var/www/redmine-3.3/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:68:in `gitolite_admin'
/var/www/redmine-3.3/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:45:in `execute_action'
/var/www/redmine-3.3/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:24:in `resync_gitolite'
/var/www/redmine-3.3/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_accessor.rb:146:in `resync_gitolite'
/var/www/redmine-3.3/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_accessor.rb:25:in `destroy_ssh_key'
/var/www/redmine-3.3/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:56:in `block (4 levels) in <top (required)>'
/var/www/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `each'
/var/www/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `each'
/var/www/redmine-3.3/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:54:in `block (3 levels) in <top (required)>'
/var/www/redmine-3.3/plugins/redmine_git_hosting/lib/tasks/migration_tools.rake:158:in `block (2 levels) in <top (required)>'
/var/www/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/var/www/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `eval'
/var/www/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine_git_hosting:migration_tools:rename_ssh_keys
(See full trace by running task with --trace)

Any idea what could be wrong or what should I modify?

EDIT/UPDATE: in case anyone stumbles upon same issue here is the cure:

#339 (comment) see paragraph 8)

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