Mailing List Archive

Trac 1.4.3 - GitError: Could not retrieve GIT version
Hi,

I've had to migrate my Trac setup from a shared server to a new VPS running
Debian 5.10

I've got Trac working (in a virtualenv served by Gunicorn and nginx) and
serving everything except my GIT repositories.

The trac.log has lots of entries like the following:

Trac[git_fs] ERROR: GitError: Could not retrieve GIT version (tried to
execute/parse 'git --version' but got OSError(2, 'No such file or
directory'))

Git is definitely installed and available to the user that my trac server
is running under. The command "sudo -u www-data git
--git-dir=/path/to/my/repos.git fsck" returns sensible results and no error.

Why is Git not working within Trac?

TIA,

Rob Hills
Waikiki, Western Australia

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/7bb4a9ba-b6d6-4eee-97f6-779618b3ba67n%40googlegroups.com.
Re: Trac 1.4.3 - GitError: Could not retrieve GIT version [ In reply to ]
On 2022/10/21 1:06, Rob Hills wrote:
> Hi,
>
> I've had to migrate my Trac setup from a shared server to a new VPS running Debian 5.10
>
> I've got Trac working (in a virtualenv served by Gunicorn and nginx)  and serving everything except my GIT repositories.
>
> The trac.log has lots of entries like the following:
>
> Trac[git_fs] ERROR: GitError: Could not retrieve GIT version (tried to execute/parse 'git --version' but got OSError(2, 'No such file or directory'))
>
> Git is definitely installed and available to the user that my trac server is running under. The command "sudo -u www-data git --git-dir=/path/to/my/repos.git fsck" returns sensible results and no error.
>
> Why is Git not working within Trac?
>
> TIA,
>
> Rob Hills
> Waikiki, Western Australia

That is an installation issue, not a Trac issue.

The OSError(2, 'No such file or directory') means "git" command doesn't exist
in PATH environment of the Trac process.

It seems that git command in your environment is installed in non-standard
location.

Try to confirm location of git command using which or type command and
configure [git] git_bin in your trac.ini.

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/226e768f-5cb1-8e23-d19a-7bdb3161d35f%40gmail.com.