Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#5480 closed defect (invalid)

GitError: GIT control files not found

Reported by: tmontuori@… Owned by: hvr
Priority: normal Component: GitPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Attempted to use GitPlugin (v. 0.11.0.2; most recent SVN version as of today) to provide git repository support for a project. GitPlugin installs just fine using python-setuptools. Too, when using tracd to host, the plugin works fine. However, when using mod_python, I get this error:

Trac detected an internal error:

GitError: GIT control files not found, maybe wrong directory?

I think that the problem is in this mess:

2009-07-06 17:14:15,200 Trac[git_fs] INFO: detected GIT version 1.5.6.3
2009-07-06 17:14:15,200 Trac[PyGIT] ERROR: GIT control files missing in '/home/tony/bin/eggdrop/scripts/.git'
2009-07-06 17:14:15,202 Trac[main] ERROR: Internal Server Error: 
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/web/main.py", line 435, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/web/main.py", line 175, in dispatch
    chosen_handler)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/web/main.py", line 298, in _pre_process_request
    chosen_handler = filter_.pre_process_request(req, chosen_handler)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/versioncontrol/api.py", line 86, in pre_process_request
    self.get_repository(req.authname).sync()
  File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/versioncontrol/api.py", line 157, in get_repository
    repos = self._connector.get_repository(rtype, rdir, authname)
  File "build/bdist.linux-i686/egg/tracext/git/git_fs.py", line 159, in get_repository
    shortrev_len=self._shortrev_len)
  File "build/bdist.linux-i686/egg/tracext/git/git_fs.py", line 176, in __init__ 
    git_bin=git_bin).getInstance()
  File "build/bdist.linux-i686/egg/tracext/git/PyGIT.py", line 120, in __init__
    i = Storage(repo, log, git_bin)
  File "build/bdist.linux-i686/egg/tracext/git/PyGIT.py", line 194, in __init__
    raise GitError("GIT control files not found, maybe wrong directory?")
GitError: GIT control files not found, maybe wrong directory?

...but just in case I'm wrong, I've attached my trac.log and trac.ini files.

Attachments (1)

trac.log (47.7 KB) - added by tmontuori@… 5 years ago.
Trac log file

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by tmontuori@…

Trac log file

comment:1 Changed 5 years ago by tmontuori@…

  • Resolution set to invalid
  • Status changed from new to closed

Figured out what the issue is; the git repo wasn't owned by the user that Apache/mod_python runs as.

Bit of a nuisance, but makes sense anyway.

comment:2 Changed 4 years ago by anonymous

/!\ NOTE: the Test.git above needs to be the .git repository directory (i.e. the one containing the file HEAD and config), not the working tree directory that holds the .git/ folder.

Add Comment

Modify Ticket

Action
as 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.