Skip to content

gitea keys fails: Forbidden attempt to access internal url #17497

Closed
@rmsc

Description

@rmsc

Gitea Version

1.15.6-rootless

Git Version

No response

Operating System

No response

How are you running Gitea?

I'm running the "gitea:1.15.6-rootless" docker image under rootless podman.

Database

MySQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/rmsc/b4bcdec9ee84cd67a2ed2f1870ce73d2

Description

I'm using gitea keys in an AuthorizedKeysCommand. It used to work in at least in version 1.15.4, but is not working anymore, and is failing with a weird error:

$ sudo -u git /usr/bin/podman exec -it gitea-app /usr/local/bin/gitea keys -u git -t ed_25519 -k <REDACTED>
2021/10/30 22:02:52 main.go:117:main() [F] Failed to run app with [/usr/local/bin/gitea keys -u git -t ed_25519 -k <REDACTED>]: Failed to update public key: readObjectStart: expect { or n, but found F, error found in #1 byte of ...|Forbidden
	|..., bigger context ...|Forbidden
	|...

The error happens regardless of whether the key is correct or not. The server log reports a Forbidden attempt to access internal url, as per the provided log gist.

Screenshots

No response

EDIT: I'm not so sure I was using the rootless version of 1.15.4 when it worked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions