Unable to detect git version

Issue #611 resolved
created an issue

I recently activated the git backend and this error is in the log:

[rhodecode.lib.utils] GIT version detected:
[rhodecode.lib.utils] GIT version detected:
[rhodecode.lib.utils] Unable to detect git version org error was:'git: not found\n'
[rhodecode.lib.utils] Unable to detect git version org error was:'git: not found\n'

I'm running v1.4.4, hg works fine. I'm using apache2 and mod_wsgi. My apache user is 'www'. This user has no home directory. Can this be the problem?

git --version
git version

Comments (10)

  1. Marcin Kuzminski repo owner

    Could it be possible that when running from mod_wsgi git executable is not within the PATH ? and rhodecode cannot see it ? Can you try using pure paster and test if it has the same issue ?

  2. q000te reporter

    Start paster as root from comandline :

    [rhodecode.lib.utils] Unable to detect git version org error was:'Traceback (most recent call last):\n  File "/usr/local/www/rhodecode-venv/lib/python2.7/site-packages/rhodecode/lib/utils.py", line 691, in check_git_version\n    _ver = StrictVersion(ver)\n  File "/usr/local/lib/python2.7/distutils/version.py", line 40, in __init__\n    self.parse(vstring)\n  File "/usr/local/lib/python2.7/distutils/version.py", line 107, in parse\n    raise ValueError, "invalid version number \'%s\'" % vstring\nValueError: invalid version number \'\'\n'
  3. Marcin Kuzminski repo owner

    That is actually fine, it's another issue with RhodeCode git detection(fails for for git version with 4 parts fixed in beta), but it shows that when runned from paster git version is detected correctly. Try fixing PATH on mod_wsgi that it can see git binary.

  4. q000te reporter

    I add the following into dispatch.wsgi

    os.environ["PATH"] += os.pathsep + '/usr/local/bin'

    and it works ( at least it should with the actual beta... ):

    [rhodecode.lib.utils] GIT version detected: git version
  5. Log in to comment