Re: [Trac] Git integration simply does not work
stefgers <[email protected]> Sat, 18 Apr 2026 02:26:31 -0700 (PDT)
| Newsgroups | gmane.comp.version-control.subversion.trac.general |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_658612_2113152479.1776504391707
Content-Type: multipart/alternative;
boundary="----=_Part_658613_102764598.1776504391707"
------=_Part_658613_102764598.1776504391707
Content-Type: text/plain; charset="UTF-8"
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 git repository needs to be provided as a "running server",
see https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server#_getting_git_on_a_server
- the cloned repository directory does not contain any git-executables
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
Asher Mullaney schrieb am Montag, 6. April 2026 um 16:25:15 UTC+2:
> Thanks!
>
> I had not changed the repository type in the admin page.
>
> Thanks again,
>
> --ajmull
>
> On Mon, 6 Apr 2026, 13:16 Andi B., <[email protected]> wrote:
>
>> 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.
>>
>>
>> Am So., 5. Apr. 2026 um 19:32 Uhr schrieb Asher Mullaney <
>> [email protected]>:
>>
>>> 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!
>>>
>>> --
>>> 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+...-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
>>> To view this discussion visit
>>> https://groups.google.com/d/msgid/trac-users/c9f0651f-8dc9-4e2d-962c-8db3290a828dn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/trac-users/c9f0651f-8dc9-4e2d-962c-8db3290a828dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> This message was not sent from some iToy advertising machine.
>> Diese Nachricht wurde nicht von iRgendeinem Spamschleuder-Spielzeug
>> versandt.
>>
>> --
>> 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+...-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
>>
> To view this discussion visit
>> https://groups.google.com/d/msgid/trac-users/CADnP-KBvLr3rfOv5BF6%2BM9N7KGbBNerJCmzsXK07DmHAD4ntag%40mail.gmail.com
>> <https://groups.google.com/d/msgid/trac-users/CADnP-KBvLr3rfOv5BF6%2BM9N7KGbBNerJCmzsXK07DmHAD4ntag%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To view this discussion visit https://groups.google.com/d/msgid/trac-users/22637d3c-3fa6-4fed-9b0a-abceeceea1b7n%40googlegroups.com.
------=_Part_658613_102764598.1776504391707
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div>
If you don't see any "Browse Source" tab, this means that trac cannot=20
access any git-executables or server-adress to question for the proper=20
content of the repositories=C2=A0 ...</div><div><br /></div><div>It took me=
a while to get it running in my docker setup ...</div><div>... that's why =
I share this answer. You might have found your solution already ;-)</div><d=
iv>
<div><div><br /></div><div>Essential for both is the understanding of the p=
roper git-installation & repository location:</div><div><ul><li>the git=
repository needs to be provided as a "running server", see=C2=A0https://gi=
t-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server#_getting_git=
_on_a_server<ul><li>the cloned repository directory does not contain any gi=
t-executables</li></ul></li></ul></div></div><div></div><div></div>
</div><div>The key is the following difference in the setup</div><div><ul><=
li>A) trac and git executables on the same server<ul><li>=3D> the hook c=
oncept is working, as trac can run the git server tasks and git can trigger=
the trac executable to update the repository index</li></ul></li><li>B) tr=
ac and git on different maschines<ul><li>in my case these are two different=
Docker containers (self-defined trac container, standard httpd with git ad=
ded - both using the same "passwords.pwd")</li><li>git access through a sub=
-path as your "/srv/git/gignore.git" or a completely different URL</li><li>=
=3D> you need to activate "sync on every request" for each repository=C2=
=A0in the repository admin page<ul><li>this makes trac quesioning the git-s=
erver whenever you click on the "Browe Source" or some other git-link</li><=
/ul></li></ul></li></ul>best regards</div><div>Stefan</div><div class=3D"gm=
ail_quote"><div dir=3D"auto" class=3D"gmail_attr">Asher Mullaney schrieb am=
Montag, 6. April 2026 um 16:25:15 UTC+2:<br/></div><blockquote class=3D"gm=
ail_quote" style=3D"margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 20=
4, 204); padding-left: 1ex;"><div dir=3D"auto">Thanks!<div dir=3D"auto"><br=
></div><div dir=3D"auto">I had not changed the repository type in the admin=
page.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Thanks again,</di=
v><div dir=3D"auto"><br></div><div dir=3D"auto">--ajmull</div></div><br><di=
v class=3D"gmail_quote"></div><div class=3D"gmail_quote"><div dir=3D"ltr" c=
lass=3D"gmail_attr">On Mon, 6 Apr 2026, 13:16 Andi B., <<a href data-ema=
il-masked rel=3D"nofollow">[email protected]</a>> wrote:<br></div></div=
><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"=
><div class=3D"gmail_default" style=3D"font-family:courier new,monospace">W=
hen you add the repository at ADMIN page did you switch the 'Methode=
9; drop down menu from (Standard) to git? Added name and directory on the s=
ame line?</div><div class=3D"gmail_default" style=3D"font-family:courier ne=
w,monospace"><br></div><div class=3D"gmail_default" style=3D"font-family:co=
urier new,monospace">I'm also new to trac but my git repositories shows=
up.</div><div class=3D"gmail_default" style=3D"font-family:courier new,mon=
ospace"><br></div><div class=3D"gmail_default" style=3D"font-family:courier=
new,monospace">I also don't have these lines in my trac.ini</div><div =
class=3D"gmail_default" style=3D"font-family:courier new,monospace">[reposi=
tory]<br>.type =3D git<br>.dir =3D /srv/git/gignore.git</div><div class=3D"=
gmail_default" style=3D"font-family:courier new,monospace"><br></div><div c=
lass=3D"gmail_default" style=3D"font-family:courier new,monospace">I think =
the git repository is stored in=C2=A0./db/trac.db instead.=C2=A0</div><div =
class=3D"gmail_default" style=3D"font-family:courier new,monospace"><br></d=
iv><div class=3D"gmail_default" style=3D"font-family:courier new,monospace"=
>I also discovered a message to add a hook to some git files to work proper=
ly. But I don't need to do this. Git integration works as expected.</di=
v><div class=3D"gmail_default" style=3D"font-family:courier new,monospace">=
<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gm=
ail_attr">Am So., 5. Apr. 2026 um 19:32=C2=A0Uhr schrieb Asher Mullaney <=
;<a href rel=3D"noreferrer nofollow" data-email-masked>[email protected]=
</a>>:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>H=
i!</div><div><br></div><div>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 lo=
ok at the TracGit page and did the suggested changes, but to no avail: ther=
e 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/g=
it/gignore.git is the git repository).</div><div><br></div><div>Any help is=
greatly appreciated.</div><div><br></div><div>Thanks!</div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;Trac Users" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href rel=3D"noreferrer nofollow" data-email-masked>trac-users+..=
[email protected]</a>.<br>
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
trac-users/c9f0651f-8dc9-4e2d-962c-8db3290a828dn%40googlegroups.com?utm_med=
ium=3Demail&utm_source=3Dfooter" rel=3D"noreferrer nofollow" target=3D"=
_blank" data-saferedirecturl=3D"https://www.google.com/url?hl=3Dde&q=3D=
https://groups.google.com/d/msgid/trac-users/c9f0651f-8dc9-4e2d-962c-8db329=
0a828dn%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&s=
ource=3Dgmail&ust=3D1776589627726000&usg=3DAOvVaw31zdRd12Se4xpI4YxR=
w88P">https://groups.google.com/d/msgid/trac-users/c9f0651f-8dc9-4e2d-962c-=
8db3290a828dn%40googlegroups.com</a>.<br>
</blockquote></div><div><br clear=3D"all"></div><br><span class=3D"gmail_si=
gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><d=
iv dir=3D"ltr"><div><span style=3D"color:rgb(153,153,153)">This message was=
not sent from some iToy advertising machine.</span><br></div><span style=
=3D"color:rgb(153,153,153)">Diese Nachricht wurde nicht von iRgendeinem Spa=
mschleuder-Spielzeug versandt.=C2=A0</span> <br></div></div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;Trac Users" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href rel=3D"noreferrer nofollow" data-email-masked>trac-users+..=
[email protected]</a>.<br></blockquote></div><div class=3D"gmail_quote"><b=
lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
#ccc solid;padding-left:1ex">
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
trac-users/CADnP-KBvLr3rfOv5BF6%2BM9N7KGbBNerJCmzsXK07DmHAD4ntag%40mail.gma=
il.com?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"noreferrer nofoll=
ow" target=3D"_blank" data-saferedirecturl=3D"https://www.google.com/url?hl=
=3Dde&q=3Dhttps://groups.google.com/d/msgid/trac-users/CADnP-KBvLr3rfOv=
5BF6%252BM9N7KGbBNerJCmzsXK07DmHAD4ntag%2540mail.gmail.com?utm_medium%3Dema=
il%26utm_source%3Dfooter&source=3Dgmail&ust=3D1776589627726000&=
usg=3DAOvVaw2Jc6Sdm_JtWDZP471q0XPF">https://groups.google.com/d/msgid/trac-=
users/CADnP-KBvLr3rfOv5BF6%2BM9N7KGbBNerJCmzsXK07DmHAD4ntag%40mail.gmail.co=
m</a>.<br>
</blockquote></div>
</blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Trac Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:trac-users+unsubscribe-/[email protected]">trac-use=
rs+unsubscribe-/[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
trac-users/22637d3c-3fa6-4fed-9b0a-abceeceea1b7n%40googlegroups.com?utm_med=
ium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/trac-use=
rs/22637d3c-3fa6-4fed-9b0a-abceeceea1b7n%40googlegroups.com</a>.<br />
------=_Part_658613_102764598.1776504391707--
------=_Part_658612_2113152479.1776504391707--