Gitea cannot start #10543

Closed
opened 2025-11-02 09:10:50 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @superflewis on GitHub (Mar 28, 2023).

Description

Mar 26 22:16:00 dub20 gitea[1913129]: 2023/03/26 22:16:00 ...y_authorized_keys.go:136:RewriteAllPublicKeys() [E] Unable to MkdirAll(/home/git/.ssh): mkdir /home/git: permission denied
Mar 26 22:16:00 dub20 gitea[1913129]: 2023/03/26 22:16:00 routers/init.go:61:mustInit() [F] code.gitea.io/gitea/models/asymkey.RewriteAllPublicKeys failed: mkdir /home/git: permission denied
Mar 26 22:16:00 dub20 systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE
Mar 26 22:16:00 dub20 systemd[1]: gitea.service: Failed with result 'exit-code'.

Gitea Version

v1.19.0-rc0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.30.2

Operating System

Debian

How are you running Gitea?

Binary install

Database

MySQL

Originally created by @superflewis on GitHub (Mar 28, 2023). ### Description Mar 26 22:16:00 dub20 gitea[1913129]: 2023/03/26 22:16:00 ...y_authorized_keys.go:136:RewriteAllPublicKeys() [E] Unable to MkdirAll(/home/git/.ssh): mkdir /home/git: permission denied Mar 26 22:16:00 dub20 gitea[1913129]: 2023/03/26 22:16:00 routers/init.go:61:mustInit() [F] code.gitea.io/gitea/models/asymkey.RewriteAllPublicKeys failed: mkdir /home/git: permission denied Mar 26 22:16:00 dub20 systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE Mar 26 22:16:00 dub20 systemd[1]: gitea.service: Failed with result 'exit-code'. ### Gitea Version v1.19.0-rc0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.30.2 ### Operating System Debian ### How are you running Gitea? Binary install ### Database MySQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 09:10:50 -06:00
Author
Owner

@eeyrjmr commented on GitHub (Mar 28, 2023):

What user is gitea being run as and what user owns /home/git ?

@eeyrjmr commented on GitHub (Mar 28, 2023): What user is gitea being run as and what user owns /home/git ?
Author
Owner

@superflewis commented on GitHub (Mar 29, 2023):

Well... there is no /home/git folder. I caught the process:

git 1720 1 0 20:26 ? 00:00:00 /usr/local/bin/gitea web --config /etc/gitea/app.ini

@superflewis commented on GitHub (Mar 29, 2023): Well... there is no /home/git folder. I caught the process: git 1720 1 0 20:26 ? 00:00:00 /usr/local/bin/gitea web --config /etc/gitea/app.ini
Author
Owner

@superflewis commented on GitHub (Mar 29, 2023):

root@dub20:/home/williew# /usr/sbin/adduser
--system
--shell /bin/bash
--gecos 'Git Version Control'
--group
--disabled-password
--home /home/git
git
The system user `git' already exists. Exiting.
root@dub20:/home/williew# cd ..
root@dub20:/home# ls
lost+found williew

@superflewis commented on GitHub (Mar 29, 2023): root@dub20:/home/williew# /usr/sbin/adduser \ --system \ --shell /bin/bash \ --gecos 'Git Version Control' \ --group \ --disabled-password \ --home /home/git \ git The system user `git' already exists. Exiting. root@dub20:/home/williew# cd .. root@dub20:/home# ls lost+found williew
Author
Owner

@wxiaoguang commented on GitHub (Mar 29, 2023):

Then you need to mkdir /home/git and make git user as its owner, because you declares that --home /home/git

@wxiaoguang commented on GitHub (Mar 29, 2023): Then you need to `mkdir /home/git` and make `git` user as its owner, because you declares that ` --home /home/git`
Author
Owner

@superflewis commented on GitHub (Mar 29, 2023):

Works finally! Thanks so much!

@superflewis commented on GitHub (Mar 29, 2023): Works finally! Thanks so much!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10543