dump: Failed to include repositories: open /data/git/repositories: no such file or directory #8204

Open
opened 2025-11-02 07:57:23 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @singuliere on GitHub (Dec 2, 2021).

Gitea Version

1.15.6

Git Version

2.30.2

How are you running Gitea?

$ docker run --name gitea -p 8080:3000 -e GITEA__security__INSTALL_LOCK=true -d gitea/gitea:1.15.6
$ docker exec gitea gitea admin user create --admin --username root --password admin1234 --email admin@example.com

Database

SQLite

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

Steps to reproduce:

$ docker exec -ti  --user git gitea bash
bash-5.1$ cd /tmp
bash-5.1$ gitea dump
2021/12/02 14:30:00 ...dules/setting/log.go:286:newLogService() [I] Gitea v1.15.6 built with GNU Make 4.3, go1.16.9 : bindata, timetzdata, sqlite, sqlite_unlock_notify
2021/12/02 14:30:00 ...dules/setting/log.go:333:newLogService() [I] Gitea Log Mode: Console(Console:)
2021/12/02 14:30:00 ...dules/setting/log.go:249:generateNamedLogger() [I] Router Log: Console(console:)
2021/12/02 14:30:00 ...les/setting/cache.go:78:newCacheService() [I] Cache Service Enabled
2021/12/02 14:30:00 ...les/setting/cache.go:93:newCacheService() [I] Last Commit Cache Service Enabled
2021/12/02 14:30:00 ...s/setting/session.go:77:newSessionService() [I] Session Service Enabled
2021/12/02 14:30:00 ...s/storage/storage.go:171:initAttachments() [I] Initialising Attachment storage with type: 
2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/attachments
2021/12/02 14:30:00 ...s/storage/storage.go:165:initAvatars() [I] Initialising Avatar storage with type: 
2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/avatars
2021/12/02 14:30:00 ...s/storage/storage.go:183:initRepoAvatars() [I] Initialising Repository Avatar storage with type: 
2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/repo-avatars
2021/12/02 14:30:00 ...s/storage/storage.go:177:initLFS() [I] Initialising LFS storage with type: 
2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/git/lfs
2021/12/02 14:30:00 ...s/storage/storage.go:189:initRepoArchives() [I] Initialising Repository Archive storage with type: 
2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/repo-archive
Failed to include repositories: open /data/git/repositories: no such file or directory
2021/12/02 14:30:00 cmd/dump.go:220:runDump() [I] Dumping local repositories... /data/git/repositories
2021/12/02 14:30:00 cmd/dump.go:150:fatal() [F] Failed to include repositories: open /data/git/repositories: no such file or directory

This only happens because Gitea has no repository, which is atypical.

Screenshots

No response

Originally created by @singuliere on GitHub (Dec 2, 2021). ### Gitea Version 1.15.6 ### Git Version 2.30.2 ### How are you running Gitea? ``` $ docker run --name gitea -p 8080:3000 -e GITEA__security__INSTALL_LOCK=true -d gitea/gitea:1.15.6 $ docker exec gitea gitea admin user create --admin --username root --password admin1234 --email admin@example.com ``` ### Database SQLite ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description Steps to reproduce: ``` $ docker exec -ti --user git gitea bash bash-5.1$ cd /tmp bash-5.1$ gitea dump 2021/12/02 14:30:00 ...dules/setting/log.go:286:newLogService() [I] Gitea v1.15.6 built with GNU Make 4.3, go1.16.9 : bindata, timetzdata, sqlite, sqlite_unlock_notify 2021/12/02 14:30:00 ...dules/setting/log.go:333:newLogService() [I] Gitea Log Mode: Console(Console:) 2021/12/02 14:30:00 ...dules/setting/log.go:249:generateNamedLogger() [I] Router Log: Console(console:) 2021/12/02 14:30:00 ...les/setting/cache.go:78:newCacheService() [I] Cache Service Enabled 2021/12/02 14:30:00 ...les/setting/cache.go:93:newCacheService() [I] Last Commit Cache Service Enabled 2021/12/02 14:30:00 ...s/setting/session.go:77:newSessionService() [I] Session Service Enabled 2021/12/02 14:30:00 ...s/storage/storage.go:171:initAttachments() [I] Initialising Attachment storage with type: 2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/attachments 2021/12/02 14:30:00 ...s/storage/storage.go:165:initAvatars() [I] Initialising Avatar storage with type: 2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/avatars 2021/12/02 14:30:00 ...s/storage/storage.go:183:initRepoAvatars() [I] Initialising Repository Avatar storage with type: 2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/repo-avatars 2021/12/02 14:30:00 ...s/storage/storage.go:177:initLFS() [I] Initialising LFS storage with type: 2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/git/lfs 2021/12/02 14:30:00 ...s/storage/storage.go:189:initRepoArchives() [I] Initialising Repository Archive storage with type: 2021/12/02 14:30:00 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/repo-archive Failed to include repositories: open /data/git/repositories: no such file or directory 2021/12/02 14:30:00 cmd/dump.go:220:runDump() [I] Dumping local repositories... /data/git/repositories 2021/12/02 14:30:00 cmd/dump.go:150:fatal() [F] Failed to include repositories: open /data/git/repositories: no such file or directory ``` This only happens because Gitea has no repository, which is atypical. ### Screenshots _No response_
Author
Owner

@wxiaoguang commented on GitHub (Dec 2, 2021):

This is a know problem, and should have been fixed by

Oh sorry, I misread the log ....

If there is no repository, maybe the error is not that serious 😊

And I remembered this one: https://github.com/go-gitea/gitea/blob/main/modules/setting/directory.go , Gitea should prepare the directories when installing/upgrading.

@wxiaoguang commented on GitHub (Dec 2, 2021): ~~This is a know problem, and should have been fixed by~~ Oh sorry, I misread the log .... If there is no repository, maybe the error is not that serious 😊 And I remembered this one: https://github.com/go-gitea/gitea/blob/main/modules/setting/directory.go , Gitea should prepare the directories when installing/upgrading.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8204