Skip to content

Since 1.15.0, downloading a release attachment using Basic auth redirect to login #16914

Closed
@kenji21

Description

@kenji21
  • Gitea version (or commit ref): 1.15.0
  • Git version: 2.20.1
  • Operating system: Debian 10 (running from systemd)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (needs a private repo)
  • Log gist:
Sep  1 12:37:04 gitea gitea[25215]: 2021/09/01 12:37:04 Started GET /:owner/:repo/releases/download/:tag/some.zip for REDACTED_IP:0
Sep  1 12:37:04 gitea gitea[25215]: 2021/09/01 12:37:04 Completed GET /:owner/:repo/releases/download/:tag/some.zip 302 Found in 349.553µs
Sep  1 12:37:04 gitea gitea[25215]: 2021/09/01 12:37:04 Started GET /user/login for REDACTED_IP:0
Sep  1 12:37:04 gitea gitea[25215]: 2021/09/01 12:37:04 Completed GET /user/login 200 OK in 4.64655ms

Description

We used to download release zip (using ansible), since 1.15.0, using curl, curl --netrc --location https://instance/:owner/:repo/releases/download/:tag/some.zip redirects to /user/login instead of the attachment

so we have the html page instead of the zip content

Note that getting a file from the repo, for exemple curl --netrc --location https://instance/:owner/:repo/raw/branch/develop/Jenkinsfile works well, so definitively not a auth error
Didn't get this issue with 1.14.6 (nor with previous versions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/regressionIndicates a previously functioning feature or behavior that has broken or regressed after a change

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions