- Gitea version (or commit ref): 1.14.0+dev-290-gb1cf7f4df
- Git version:
- Operating system: -
- Database (use
[x]):
- Can you reproduce the bug at https://try.gitea.io:
- Log gist:
Description
When fetchting raw files of private repos, one needs to pass some form of authentication.
Usually ?token=<token> is appended or the token is passed via -u <username>:<token> in the request, e.g. in curl <URL>.
Works in GitHub when providing a token, returns a 404 without a token.
In Gitea however I see the following:
Without a token
curl https://try.gitea.io/pat-s/test/raw/branch/master/README.md
-> HTML response (expecting a 404)
With token
curl -u <username>:<token> https://try.gitea.io/pat-s/test/raw/branch/master/README.md
-> HTML response (expecting raw response)
With password
curl -u <username>:<password> https://try.gitea.io/pat-s/test/raw/branch/master/README.md
-> raw response
[x]):Description
When fetchting raw files of private repos, one needs to pass some form of authentication.
Usually
?token=<token>is appended or the token is passed via-u <username>:<token>in the request, e.g. incurl <URL>.Works in GitHub when providing a token, returns a 404 without a token.
In Gitea however I see the following:
Without a token
curl https://try.gitea.io/pat-s/test/raw/branch/master/README.md-> HTML response (expecting a 404)
With token
curl -u <username>:<token> https://try.gitea.io/pat-s/test/raw/branch/master/README.md-> HTML response (expecting raw response)
With password
curl -u <username>:<password> https://try.gitea.io/pat-s/test/raw/branch/master/README.md-> raw response