Project

General

Profile

Git repository strange problem

Added by Nelson Levert over 10 years ago

Hi all,

I correctly configured Redmine on my laptop (ubuntu).
The integration with Git works very well. NO PROBLEM !

Then, I moved to a server running on centos (AWS).

I correcty configured redmine on the server.
I created a bare repository in /home/ec2-user/project.git and then add it in redmine's configuration. When I go to the repository tab, i have the following error:

Started GET "/projects/project/repository" for 109.208.32.211 at Tue Dec 31 11:05:20 +0000 2013
Processing by RepositoriesController#show as HTML
  Parameters: {"id"=>"project"}
  Current user: admin (id=1)
SCM command failed, make sure that your SCM command (e.g. svn) is in PATH (/usr/lib64/ruby/gems/1.8/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin)
You can configure your scm commands in config/configuration.yml.
'/usr/bin/git' '--git-dir' '/home/ec2-user/project.git' '-c' 'core.quotepath=false' '-c' 'log.decorate=no' 'log' '--no-color' '--encoding=UTF-8' '--raw' '--date=iso' '--pretty=fuller' '--parents' '--stdin' '--reverse'
with: can't dup NilClass
  Rendered common/error.html.erb within layouts/base (0.3ms)
Completed 500 Internal Server Error in 598.1ms (Views: 238.2ms | ActiveRecord: 32.7ms)

If I execute the same command in a shell, it works perfectly.

'/usr/bin/git' '--git-dir' '/home/ec2-user/project.git' '-c' 'core.quotepath=false' '-c' 'log.decorate=no' 'log' '--no-color' '--encoding=UTF-8' '--raw' '--date=iso' '--pretty=fuller' '--parents' '--stdin' '--reverse'

I also tried to call the fetch_changesets and got this:

Started GET "/sys/fetch_changesets?key=wOWOde2ql9AhCRbmAz0t" for 109.208.32.211 at Tue Dec 31 11:05:24 +0000 2013
Processing by SysController#fetch_changesets as HTML
  Parameters: {"key"=>"wOWOde2ql9AhCRbmAz0t"}
SCM command failed, make sure that your SCM command (e.g. svn) is in PATH (/usr/lib64/ruby/gems/1.8/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin)
You can configure your scm commands in config/configuration.yml.
'/usr/bin/git' '--git-dir' '/home/ec2-user/project.git' '-c' 'core.quotepath=false' '-c' 'log.decorate=no' 'log' '--no-color' '--encoding=UTF-8' '--raw' '--date=iso' '--pretty=fuller' '--parents' '--stdin' '--reverse'
with: can't dup NilClass
Completed 500 Internal Server Error in 345.1ms

Redmine::Scm::Adapters::CommandFailed (can't dup NilClass):
  lib/redmine/scm/adapters/abstract_adapter.rb:276:in `shellout'
  lib/redmine/scm/adapters/abstract_adapter.rb:214:in `shellout'
  lib/redmine/scm/adapters/git_adapter.rb:402:in `git_cmd'
  lib/redmine/scm/adapters/git_adapter.rb:218:in `revisions'
  app/models/repository/git.rb:164:in `save_revisions'
  app/models/repository/git.rb:154:in `fetch_changesets'
  app/controllers/sys_controller.rb:63:in `fetch_changesets'
  app/controllers/sys_controller.rb:62:in `fetch_changesets'
  app/controllers/sys_controller.rb:61:in `each'
  app/controllers/sys_controller.rb:61:in `fetch_changesets'

Here is the configuration (there is no sh: git: command not found), so git is known and the error is something else

[ec2-user@ip-10-49-6-118 redmine-2.4.0]$ RAILS_ENV=production script/about
[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.

sh: svn: command not found
sh: darcs: command not found
sh: hg: command not found
sh: cvs: command not found
sh: bzr: command not found
Environment:
  Redmine version                2.4.0.stable
  Ruby version                   1.8.7-p374 (2013-06-27) [x86_64-linux]
  Rails version                  3.2.15
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            1.8.3.1
  Filesystem                     
Redmine plugins:
  no plugin installed

I'm waiting for your knowledge, it's probably a mistake somewhere but I've no idea where to watch.

Thanks you,
Nelson.


Replies (1)

RE: Git repository strange problem - Added by Nelson Levert over 10 years ago

I couldn't wait for the solution so I switch from centos to ubuntu server and it works fine.

    (1-1/1)