Gogs dump in docker

Hi, when i try backup gogs data i got this result:

docker exec gogs-1 ./gogs dump
2016/07/03 07:18:42 […s/setting/setting.go:415 NewContext()] [E] Expect user(git) but current user is:

docker exec -u git gogs-1 ./gogs dump
2016/07/03 07:18:54 […s/setting/setting.go:417 NewContext()] [E] Expect user(git) but current user is:

How do I run dump or what I’m doing wrong?

Thanx.

P.

I have installed Gogs Version: 0.9.35.0702 - latest gogs image

Looks like current user is empty, which means you did not set USER env variable

Yes, that’s it, Thank you vewry much.

So how did you solve it?

Simple, set environment variable USER to git. It helped.

我最近也遇到了这个问题:
2020/03/10 08:02:13 [FATAL] […g/setting/setting.go:591 NewContext()] Expect user ‘git’ but current user is:

app.ini
image

当然也是在docker容器里面的linux中,添加环境变量
export USER=git。