Git integration simply does not work

17 views
Skip to first unread message

Asher Mullaney

unread,
Apr 5, 2026, 1:32:24 PMApr 5
to Trac Users
Hi!

I am very new to Trac and I wanted to use it as a bug/task tracker for my project. I wanted to integrate my git repository into Trac so that I could browse the source of the repository. I took a look at the TracGit page and did the suggested changes, but to no avail: there is no "browse source" tab and there are no visible changes. My Trac version is 1.6. I have attached the contents of trac.ini below (/srv/git/gignore.git is the git repository).

Any help is greatly appreciated.

Thanks!
trac_ini.txt

Andi B.

unread,
Apr 6, 2026, 8:16:02 AMApr 6
to trac-...@googlegroups.com
When you add the repository at ADMIN page did you switch the 'Methode' drop down menu from (Standard) to git? Added name and directory on the same line?

I'm also new to trac but my git repositories shows up.

I also don't have these lines in my trac.ini
[repository]
.type = git
.dir = /srv/git/gignore.git

I think the git repository is stored in ./db/trac.db instead. 

I also discovered a message to add a hook to some git files to work properly. But I don't need to do this. Git integration works as expected.


--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/trac-users/c9f0651f-8dc9-4e2d-962c-8db3290a828dn%40googlegroups.com.


--
This message was not sent from some iToy advertising machine.
Diese Nachricht wurde nicht von iRgendeinem Spamschleuder-Spielzeug versandt. 

Asher Mullaney

unread,
Apr 6, 2026, 10:25:15 AMApr 6
to trac-...@googlegroups.com
Thanks!

I had not changed the repository type in the admin page.

Thanks again,

--ajmull

stefgers

unread,
Apr 18, 2026, 5:26:31 AM (12 days ago) Apr 18
to Trac Users
If you don't see any "Browse Source" tab, this means that trac cannot access any git-executables or server-adress to question for the proper content of the repositories  ...

It took me a while to get it running in my docker setup ...
... that's why I share this answer. You might have found your solution already ;-)

Essential for both is the understanding of the proper git-installation & repository location:
The key is the following difference in the setup
  • A) trac and git executables on the same server
    • => the hook concept is working, as trac can run the git server tasks and git can trigger the trac executable to update the repository index
  • B) trac and git on different maschines
    • in my case these are two different Docker containers (self-defined trac container, standard httpd with git added - both using the same "passwords.pwd")
    • git access through a sub-path as your "/srv/git/gignore.git" or a completely different URL
    • => you need to activate "sync on every request" for each repository in the repository admin page
      • this makes trac quesioning the git-server whenever you click on the "Browe Source" or some other git-link
best regards
Stefan
Reply all
Reply to author
Forward
0 new messages