Problems with git repositories containing files starting with . #431

Closed
opened 2025-11-02 03:23:15 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @simonszu on GitHub (Mar 6, 2017).

  • Gitea version (or commit ref): 1.0.1
  • Git version: 2.1.4
  • Operating system: Debian Jessie
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I have a little problem trying to access files in a git repository starting with a . from the web frontend. For example, take https://try.gitea.io/ttk/dotfiles-test/src/master. On my installation, after trying to read .config, i get a HTTP 403 error. The URL gitea tries to access is https://git.simonszu.de/dotfiles/fish/src/master/.config which looks valid.

I am accessing gitea via an nginx reverse proxy wich has the same config as it had for accessing gogits, and i'm sure that this config worked on gogits. I made sure to migrate from gogits to gitea exactly as your howto describes, so i am quite sure it is not just a configuration issue. But for the records, this is the nginx config i am using for the reverse proxy. http://pastebin.com/jFpT35T0
Be assured, if i would have been sure that it is just a configuration issue, i would have asked on the gitter channel.

On a sidenote: On try.gitea.io, in the repository i linked above, the first entry is displayed as .config/fish. A click on this link jumps directly to the /.config/fish directory, since fish is the only member of .config.
On my installation, this exact entry is displayed as .config only. After clicking on it, it jumps into .config, displaying .fish as its only member, but i have to take a second click to get into the .fish directory.

Maybe these two issues are somehow correlated, i don't know.

Originally created by @simonszu on GitHub (Mar 6, 2017). - Gitea version (or commit ref): 1.0.1 - Git version: 2.1.4 - Operating system: Debian Jessie - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description I have a little problem trying to access files in a git repository starting with a . from the web frontend. For example, take https://try.gitea.io/ttk/dotfiles-test/src/master. On my installation, after trying to read .config, i get a HTTP 403 error. The URL gitea tries to access is `https://git.simonszu.de/dotfiles/fish/src/master/.config` which looks valid. I am accessing gitea via an nginx reverse proxy wich has the same config as it had for accessing gogits, and i'm sure that this config worked on gogits. I made sure to migrate from gogits to gitea exactly as your howto describes, so i am quite sure it is not just a configuration issue. But for the records, this is the nginx config i am using for the reverse proxy. http://pastebin.com/jFpT35T0 Be assured, if i would have been sure that it is just a configuration issue, i would have asked on the gitter channel. On a sidenote: On try.gitea.io, in the repository i linked above, the first entry is displayed as `.config/fish`. A click on this link jumps directly to the /.config/fish directory, since fish is the only member of .config. On my installation, this exact entry is displayed as `.config` only. After clicking on it, it jumps into .config, displaying .fish as its only member, but i have to take a second click to get into the .fish directory. Maybe these two issues are somehow correlated, i don't know.
GiteaMirror added the issue/not-a-bug label 2025-11-02 03:23:15 -06:00
Author
Owner

@cez81 commented on GitHub (Mar 6, 2017):

Not to familiar with nginx, but isn't line 66 in your config blocking access to dotfiles?

@cez81 commented on GitHub (Mar 6, 2017): Not to familiar with nginx, but isn't line 66 in your config blocking access to dotfiles?
Author
Owner

@tboerger commented on GitHub (Mar 6, 2017):

True, line 66 should block dot files. The directory behavior is a 1.1 feature that gets released soon

@tboerger commented on GitHub (Mar 6, 2017): True, line 66 should block dot files. The directory behavior is a 1.1 feature that gets released soon
Author
Owner

@simonszu commented on GitHub (Mar 9, 2017):

Yep, removing line 66 fixed it. Sorry for creating this issue and not asking on gitter.

@simonszu commented on GitHub (Mar 9, 2017): Yep, removing line 66 fixed it. Sorry for creating this issue and not asking on gitter.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#431