Can 'browse' git repo but can't see files

74 views
Skip to first unread message

Ed Sandberg

unread,
Jun 23, 2019, 3:36:06 PM6/23/19
to Trac Users
I added a git repo to my trac page and then ran trac-admin /var/local/trac/site repository resync "myreponame". I can see the "Browse Source" button and when I look at the page the branches are listed but the list of files is just "No files found". There are files in the repo and I can clone the repo without problems. I ran chmod -R a+rx /path/to/repo so I think it should have all the permissions it needs.

Ryan Ollos

unread,
Jun 23, 2019, 3:43:52 PM6/23/19
to Trac Users
On Sun, Jun 23, 2019 at 12:36 PM Ed Sandberg <ed.sa...@adventiumlabs.com> wrote:
I added a git repo to my trac page and then ran trac-admin /var/local/trac/site repository resync "myreponame". I can see the "Browse Source" button and when I look at the page the branches are listed but the list of files is just "No files found". There are files in the repo and I can clone the repo without problems. I ran chmod -R a+rx /path/to/repo so I think it should have all the permissions it needs.

Which Trac version?

You only need to resync if you are using a Cached repository. What is in your [git] section?

- Ryan 

Edward Sandberg

unread,
Jun 23, 2019, 3:57:51 PM6/23/19
to trac-...@googlegroups.com

> Which Trac version?

Trac version 1.2

>
> You only need to resync if you are using a Cached repository. What is in
> your [git] section?

In the trac.ini file? I don't have that section. This page seems to
indicate that it is only needed for nonstandard git executable location:

https://trac.edgewall.org/wiki/TracGit

and mine is at /usr/bin/git.

I do have:

tracopt.versioncontrol.git.* = enabled

under [components]

and

[versioncontrol]
allowed_repository_dir_prefixes =
default_repository_type = git

and

safe_schemes = cvs,file,ftp,git,irc,http,https,news,sftp,smb,ssh,svn,svn+ssh

under [wiki]

> https://trac.edgewall.org/wiki/TracIni#git-section
>
> - Ryan 
>
> --
> 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
> <mailto:trac-users+...@googlegroups.com>.
> To post to this group, send email to trac-...@googlegroups.com
> <mailto:trac-...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/trac-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/CA%2BBGpn-5agQHZydF3Mr_n6MKHiNLXve1%3DzNroowPWJx3OMT6Fw%40mail.gmail.com
> <https://groups.google.com/d/msgid/trac-users/CA%2BBGpn-5agQHZydF3Mr_n6MKHiNLXve1%3DzNroowPWJx3OMT6Fw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

--
Edward Sandberg
Adventium Labs
111 3rd Avenue S. Suite #100
Minneapolis, MN 55401
ed.sa...@adventiumlabs.com

RjOllos

unread,
Jun 25, 2019, 4:07:05 PM6/25/19
to Trac Users


On Sunday, June 23, 2019 at 12:57:51 PM UTC-7, Edward Sandberg wrote:

> Which Trac version?

Trac version 1.2

>
> You only need to resync if you are using a Cached repository. What is in
> your [git] section?

In the trac.ini file? I don't have that section. This page seems to
indicate that it is only needed for nonstandard git executable location:

https://trac.edgewall.org/wiki/TracGit

and mine is at /usr/bin/git.

You are referring to the [git] git_bin option, but there are many configuration options in the [git] section.
 

I do have:

tracopt.versioncontrol.git.* = enabled

under [components]

and

[versioncontrol]
allowed_repository_dir_prefixes =
default_repository_type = git

and

safe_schemes = cvs,file,ftp,git,irc,http,https,news,sftp,smb,ssh,svn,svn+ssh

under [wiki]

> https://trac.edgewall.org/wiki/TracIni#git-section
>
> - Ryan 


Do you have SELinux enabled on the server. There were recent problems reported using SELinux:


Please set log level to DEBUG, delete or rename the log file (so that we get only the relevant stuff in the log), navigate to the page that shows "No files found" and attach the log file in a reply.


- Ryan

J Cornily

unread,
Jun 25, 2019, 7:03:16 PM6/25/19
to trac-...@googlegroups.com
Hi
I end up with the same issue,
Ryan told me to disable selinux
and this fixed the problem
I was using trac 1.2.3

Le dim. 23 juin 2019 à 21:36, Ed Sandberg <ed.sa...@adventiumlabs.com> a écrit :
I added a git repo to my trac page and then ran trac-admin /var/local/trac/site repository resync "myreponame". I can see the "Browse Source" button and when I look at the page the branches are listed but the list of files is just "No files found". There are files in the repo and I can clone the repo without problems. I ran chmod -R a+rx /path/to/repo so I think it should have all the permissions it needs.

--
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 post to this group, send email to trac-...@googlegroups.com.

Edward Sandberg

unread,
Jun 26, 2019, 12:23:12 PM6/26/19
to trac-...@googlegroups.com, RjOllos
> Please set log level to DEBUG, delete or rename the log file (so that we
> get only the relevant stuff in the log), navigate to the page that shows
> "No files found" and attach the log file in a reply.
>
> https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheLogs

Log is attached. This line looks suspicious:

2019-06-26 15:56:09,668 Trac[PyGIT] DEBUG: git exits with 128, dir:
u'/var/lib/gitolite3/repositories/anml.git', args: ls-tree ('-z', '-l',
'72175f6f15c666c1d011da05abd36d349e8fc4fb', '--', ''), stderr: 'fatal:
empty string is not a valid pathspec. please use . instead if you meant
to match all paths\n'

I found that other people have seen this problem:

https://trac.edgewall.org/ticket/12992

but I don't know what I need to do to resolve it.

>
> - Ryan
>
> --
> 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
> <mailto:trac-users+...@googlegroups.com>.
> To post to this group, send email to trac-...@googlegroups.com
> <mailto:trac-...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/trac-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/3c06297d-bcfd-4061-9e07-eec0851930c6%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/3c06297d-bcfd-4061-9e07-eec0851930c6%40googlegroups.com?utm_medium=email&utm_source=footer>.
trac.log

Edward Sandberg

unread,
Jun 26, 2019, 1:14:22 PM6/26/19
to trac-...@googlegroups.com, RjOllos
> I found that other people have seen this problem:
>
> https://trac.edgewall.org/ticket/12992
>
> but I don't know what I need to do to resolve it.
>

I fixed it. I assumed the package on Ubuntu 18.04 would have the fix
they talked about since it is over a year old but it did not. I applied
the fix and all is well. Thanks for your help!

Ryan Ollos

unread,
Jun 26, 2019, 1:59:42 PM6/26/19
to Edward Sandberg, Trac Users, RjOllos
On Wed, Jun 26, 2019 at 10:14 AM Edward Sandberg <ed.sa...@adventiumlabs.com> wrote:
> I found that other people have seen this problem:
>
> https://trac.edgewall.org/ticket/12992
>
> but I don't know what I need to do to resolve it.
>

I fixed it. I assumed the package on Ubuntu 18.04 would have the fix
they talked about since it is over a year old but it did not. I applied
the fix and all is well. Thanks for your help!

Great. I recommend using Trac 1.2.3, since Trac 1.2 was released so long ago and there have been many fixes.

- Ryan 

Abdelrahman Shouman

unread,
May 10, 2020, 12:12:17 PM5/10/20
to Trac Users
Hi Edward,

May I know what was the issue in your case?

RjOllos

unread,
May 10, 2020, 3:54:07 PM5/10/20
to Trac Users


On Sunday, May 10, 2020 at 9:12:17 AM UTC-7, Abdelrahman Shouman wrote:
Hi Edward,

May I know what was the issue in your case?

Upgrade to Trac 1.2.1 or later. 

Abdelrahman Shouman

unread,
May 11, 2020, 12:40:33 PM5/11/20
to Trac Users
Yea, it took me a while to figure out what you meant there.

It seems the package on Ubuntu is actually an old one. 
Installing Trac using pip will get the latest version which have the fix.

In my case I had to add it to the path as well, "export PATH=$PATH:~/.local/bin"
Just leaving this here in case someone faces this issue as well.

Thanks @RjOllos  

RjOllos

unread,
May 26, 2020, 2:23:47 PM5/26/20
to Trac Users


On Monday, May 11, 2020 at 9:40:33 AM UTC-7, Abdelrahman Shouman wrote:
Yea, it took me a while to figure out what you meant there.

It seems the package on Ubuntu is actually an old one. 
Installing Trac using pip will get the latest version which have the fix.

In my case I had to add it to the path as well, "export PATH=$PATH:~/.local/bin"
Just leaving this here in case someone faces this issue as well.

I'm guessing you installed as a standard user rather than using sudo, and probably used the "--user" flag for pip:

  --user                      Install to the Python user install directory for your
                              platform. Typically ~/.local/, or %APPDATA%\Python on
                              Windows. (See the Python documentation for site.USER_BASE
                              for full details.)
Reply all
Reply to author
Forward
0 new messages