Skip to content

Deploy key with write access can not push #19009

Closed
@wxiaoguang

Description

@wxiaoguang
2022/03/06 00:00:42 router: completed GET /api/internal/serv/command/21/org/repo?mode=2&verb=git-receive-pack for 127.0.0.1:34602, 200 OK in 6.2ms @ private/serv.go:81(private.ServCommand)

2022/03/06 00:00:42 router: completed POST /api/internal/hook/pre-receive/org/repo for 127.0.0.1:34604, 403 Forbidden in 5.8ms @ private/hook_pre_receive.go:107(private.HookPreReceive)

2022/03/06 00:00:42 router: completed POST /api/internal/ssh/21/update/42 for 127.0.0.1:34606, 200 OK in 10.4ms @ private/key.go:18(private.UpdatePublicKeyInRepo)

The HookPreReceive calls AssertCanWriteCode, but AssertCanWriteCode only checks user's permission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions