Opened 8 years ago

Closed 7 years ago

# Cannot Detect GIT Version

Reported by: Owned by: czerwonka@… Herbert Valerio Riedel normal GitPlugin normal 0.11

### Description

Replying to thatch from [Ticket #4227]:

Make sure you're using the latest version of the git plugin for trac as well, that's where the fix went in and the one version you didn't list. If you're using >= r5396 of the git plugin, please open a new ticket because it's likely a different issue.

I am using Trac 11.5 and GitPlugin r6294.

When I install the plugin and configure as described on the wiki (http://trac-hacks.org/wiki/GitPlugin), the Browser does not show my repository and the trac log gives be an error: Could not retrieve GIT version.

This error is being thrown by PyGit.Storage.git_version. I got around this problem by changing git_fs.py, line 66, removing the parameter, but this caused other problems I think, notably the Browser not finding my repository root.

### comment:2 in reply to:  1 ; follow-up:  5 Changed 8 years ago by anonymous

I had this problem. In the trac.ini for the project, remove the git_bin variable and allow it to use the default. Doing that made it work for me. My trac.ini looks like below:

[git]
cached_repository = true
persistent_cache = true
shortrev_len = 6


I'm using Trac 0.11.5 with git 1.6.4.2 on OpenSuse 11.1

### comment:3 Changed 8 years ago by SethX

Using debian and having done a aptitude install trac-git , i ended up creating a new trac instance, and telling it about my git repository.

Yet it failed to recognize the git repository, with the following error on the trac page: Warning: Can't synchronize with the repository (GIT backend not available). Look in the Trac log for more information.

After enabling the logs [which default to disabled] i found the following: Trac[git_fs] ERROR: GitError: Could not retrieve GIT version

This is a similar error to the one reported above, and in fact applying the solution reported above [ie, commenting out the git_bin variable] worked for me also.

### comment:4 Changed 8 years ago by SethX

Resolution: → fixed new → closed

Relatedly, if you end up with the following error:

Warning: Can't synchronize with the repository (Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? ). Look in the Trac log for more information.

Refer to:

### comment:5 in reply to:  2 Changed 7 years ago by anonymous

I had this problem. In the trac.ini for the project, remove the git_bin variable and allow it to use the default. Doing that made it work for me. My trac.ini looks like below:

[git]
cached_repository = true
persistent_cache = true
shortrev_len = 6


I'm using Trac 0.11.5 with git 1.6.4.2 on OpenSuse 11.1

Ditto, this worked for me using mediawiki 1.15, trac 0.11.5 and OpenSuse 11.2 with default git install.

### comment:6 follow-up:  7 Changed 7 years ago by anonymous

Resolution: fixed closed → reopened

Removing the git_bin definition did not solve the issue for me.

My logs say:

Trac[main] WARNING: HTTPInternalError: 500 Trac Error (Unsupported version control
system "git": Can't find an appropriate component, maybe the corresponding
plugin was not enabled? )


I don't see any kind of git_fs error.

I am using TracGit-0.11.0.2. It works with tracd, which is strange because trac is working great via mod_python.

### comment:7 in reply to:  6 Changed 7 years ago by anonymous

Resolution: → fixed reopened → closed

Removing the git_bin definition did not solve the issue for me.

My logs say:

Trac[main] WARNING: HTTPInternalError: 500 Trac Error (Unsupported version control
system "git": Can't find an appropriate component, maybe the corresponding
plugin was not enabled? )


I don't see any kind of git_fs error.

I am using TracGit-0.11.0.2. It works with tracd, which is strange because trac is working great via mod_python.

Please disregard the re-opening of this ticket. Managed to get things working by putting the TracGit-0.11.0.2-py2.6.egg into the plugins directory. This was unclear to me. I thought the file belonged in my python site-packages dir.

After that I needed to run

trac-admin /home/egon/tracenv resync


### Modify Ticket

Change Properties