You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have stood up a new instance of Gitea, and when I try to create a new repository I get a 500 server error. The syslog reports the following error: [...routers/repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: InitRepository: chdir /srv/gitea/lb.laboon/test.git: no such file or directory
(I have /srv/gitea configured as the repo directory, and can confirm that it does exist and gitea has appropriate permissions to write to it).
Upon further debugging the code, it appears that something incorrectly thinks that /srv is a read-only filesystem. I modified vendor/code.gitea.io/git/repo.go to print any errors related to os.MkdirAll and got the following: [...routers/repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: InitRepository: mkdir /srv/gitea/lb.laboon: read-only file system
I'm not sure why it is reporting that, because I can run mkdir /srv/gitea/lb.laboon manually as the gitea user and it works just fine, so I'm sort of at a loss here. Any help would be appreciated!
The text was updated successfully, but these errors were encountered:
I figured out the issue. In Arch's package of gitea the following line is included in the systemd unit file: ReadWritePaths=/etc/gitea/app.ini
This makes all other filesystem paths non-writable to the gitea process, regardless of filesystem permissions. My solution was to create a unit override file that additionally includes my custom repo path in the ReadWritePaths directive.
Description
I have stood up a new instance of Gitea, and when I try to create a new repository I get a 500 server error. The syslog reports the following error:
[...routers/repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: InitRepository: chdir /srv/gitea/lb.laboon/test.git: no such file or directory
(I have /srv/gitea configured as the repo directory, and can confirm that it does exist and gitea has appropriate permissions to write to it).
Upon further debugging the code, it appears that something incorrectly thinks that /srv is a read-only filesystem. I modified vendor/code.gitea.io/git/repo.go to print any errors related to
os.MkdirAll
and got the following:[...routers/repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: InitRepository: mkdir /srv/gitea/lb.laboon: read-only file system
I'm not sure why it is reporting that, because I can run
mkdir /srv/gitea/lb.laboon
manually as the gitea user and it works just fine, so I'm sort of at a loss here. Any help would be appreciated!The text was updated successfully, but these errors were encountered: