Skip to content

API calls returning 401 Unauthorized #13484

Closed
@AllTaken

Description

@AllTaken
  • Gitea version (or commit ref): 1.12.5 built with GNU Make 4.1, go1.14.9 : bindata, sqlite, sqlite_unlock_notify
  • Git version: 2.25.1
  • Operating system: Ubuntu 20.04.1 LTS

Gitea is as downloaded from the Releases page.

Description

Many different API calls result in 401 unauthorized, for no reason I can discern.
Setting up a blank repo in try.gitea.io with a single commit and trying to POST the following results in 401 unauthorized:

curl -X POST "https://try.gitea.io/api/v1/repos/test6661/Test/statuses/0b97b9b4de6c75125f635ee1f045f148ebd9b7b9" -H "accept: application/json" -H "Authorization: ba0969a9d789630ffa5321164315a27954221832" -H "Content-Type: application/json" -d "{ \"context\": \"Build\", \"description\": \"asdasdad\", \"state\": \"success\", \"target_url\": \"\"}"

Note that this happens when trying to use basic auth as well.

This used to work, probably as recently as 1.11.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions