Skip to content

invalid memory address or nil pointer dereference upon attempting to write to an unauthorized repo via ssh #7111

@strk

Description

@strk

See this session:

[strk@liz:~/go/src/code.gitea.io/tea(pulls-create)] git push -u origin strk/pulls-create
Gitea: Unauthorized
User: 288:strk with Key: 60:strk@liz is not authorized to write to gitea/tea.
Gitea: Internal Server Error
User: 288:strk with Key: 60:strk@liz is not authorized to write to gitea/tea.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x15ed35f]

goroutine 1 [running]:
code.gitea.io/gitea/cmd.runServ(0xc0008962c0, 0x0, 0x0)
        /go/src/code.gitea.io/gitea/cmd/serv.go:209 +0x90f
github.com/urfave/cli.HandleAction(0x1841660, 0x289d468, 0xc0008962c0, 0xc00018cb00, 0x0)
        /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:490 +0xc8
github.com/urfave/cli.Command.Run(0x1aaca54, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1b13c47, 0x2f, 0x0, ...)
        /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:210 +0x996
github.com/urfave/cli.(*App).Run(0xc0001a29c0, 0xc00003c0c0, 0x4, 0x4, 0x0, 0x0)
        /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:255 +0x6af
main.main()
        /go/src/code.gitea.io/gitea/main.go:108 +0x7fa
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

At the time of writing, gitea.com runs Gitea Version: 1.9.0+dev-316-g9002c5157

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