Trac 1.4.3 - GitError: Could not retrieve GIT version

9 views
Skip to first unread message

Rob Hills

unread,
Oct 20, 2022, 12:06:45 PM10/20/22
to Trac Users
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

Jun Omae

unread,
Oct 20, 2022, 7:22:49 PM10/20/22
to trac-...@googlegroups.com
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 <jun...@gmail.com> (大前 潤)

Reply all
Reply to author
Forward
0 new messages