Modify

Opened 5 years ago

Closed 4 years ago

Last modified 21 months ago

#5571 closed defect (fixed)

Cannot Detect GIT Version

Reported by: czerwonka@… Owned by: hvr
Priority: normal Component: GitPlugin
Severity: normal Keywords:
Cc: Trac Release: 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.

Attachments (0)

Change History (6)

comment:2 in reply to: ↑ 1 ; follow-up: Changed 5 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 5 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 5 years ago by SethX

  • Resolution set to fixed
  • Status changed from new to 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:

http://trac-hacks.org/ticket/3757

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

Replying to 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: Changed 4 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to 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 4 years ago by anonymous

  • Resolution set to fixed
  • Status changed from reopened to closed

Replying to anonymous:

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from hvr. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.