Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
singuliere opened this issue Dec 2, 2021 · 1 comment

Comments

@singuliere
Copy link
Contributor

singuliere commented 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

@wxiaoguang
Copy link
Contributor

wxiaoguang commented 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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants