Skip to content

CLI error when creating user in 1.20.3 #26615

Closed
@lonix1

Description

@lonix1

Worked in 1.20.2 but broken in 1.20.3 which was released today.

Description

In my server provisioning tool (ansible) I create users. Inside the gitea container I run:

gitea admin user create \
  --admin
  --username foo
  --password foo
  --email [email protected]
  --must-change-password=false

That works the first time. And the second time it errors with user already exists which I use to detect that the user was created in a previous run.

That worked in 1.20.2.

But after upgrading to 1.20.3 I get:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x50ff9a]

goroutine 1 [running]:
fmt.Fprintf({0x0, 0x0}, {0x32882e7, 0x12}, {0xc002c3e780, 0x1, 0x1})
        /usr/local/go/src/fmt/print.go:225 +0x7a
code.gitea.io/gitea/cmd.RunMainApp(0xc002a908c0, {0xc000000180?, 0x4?, 0xc00297e978?})
        /go/src/code.gitea.io/gitea/cmd/main.go:23 +0xc7
main.main()
        /go/src/code.gitea.io/gitea/main.go:153 +0xc2b

Gitea Version

1.20.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

I'm using gitea in docker. Host has git 2.40.1

Operating System

linux

How are you running Gitea?

docker

Database

SQLite

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