Opened 7 years ago

Closed 7 years ago

#8451 closed defect (invalid)

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

Reported by: runar@… Owned by: Herbert Valerio Riedel
Priority: highest Component: GitPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.12


I've seen #5480 - my repo is owned by www-data:www-data. The path

How to Reproduce 1

$ sudo -u www-data trac-admin ./ repository resync "Timely"
/var/lib/python-support/python2.6/svn/ DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
  import sys as _sys, os as _os, popen2 as _popen2, tempfile as _tempfile
GitError: GIT control files not found, maybe wrong directory?

How to Reproduce 2

While doing a GET operation on /admin/versioncontrol/repository, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'cat_id': u'versioncontrol', 'panel_id': u'repository', 'path_info': None}

User agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10

System Information

Trac 0.12.1
Babel 0.9.5
Docutils 0.5
Genshi 0.6
Pygments 0.10
pysqlite 2.4.1
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3]
pytz 2008h
setuptools 0.6c9
SQLite 3.6.10
Subversion 1.5.4 (r33841)
jQuery 1.4.2

Enabled Plugins

TracAccountManager 0.3dev-r9785

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/", line 511, in _dispatch_request
  File "build/bdist.linux-x86_64/egg/trac/web/", line 202, in dispatch
  File "build/bdist.linux-x86_64/egg/trac/web/", line 344, in _pre_process_request
    chosen_handler = filter_.pre_process_request(req, chosen_handler)
  File "build/bdist.linux-x86_64/egg/trac/versioncontrol/", line 330, in pre_process_request
    repo = self.get_repository(reponame)
  File "build/bdist.linux-x86_64/egg/trac/versioncontrol/", line 526, in get_repository
    repos = connector.get_repository(rtype, rdir, repoinfo.copy())
  File "build/bdist.linux-x86_64/egg/tracext/git/", line 252, in get_repository
  File "build/bdist.linux-x86_64/egg/tracext/git/", line 368, in __init__
  File "build/bdist.linux-x86_64/egg/tracext/git/", line 136, in __init__
    i = Storage(repo, log, git_bin, git_fs_encoding)
  File "build/bdist.linux-x86_64/egg/tracext/git/", line 249, in __init__
    raise GitError("GIT control files not found, maybe wrong directory?")
GitError: GIT control files not found, maybe wrong directory?

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by runar@…

Resolution: invalid
Status: newclosed

Oh, sorry. I just figured out I had to use the .git folder under the (for me) "actual" repo dir. So I did and it works.

Then I saw this is a note under Troubleshooting in the install documentation.

I would suggest making that note more visible. :)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Herbert Valerio Riedel.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.