-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Gitea won't start after upgrade #26946
Comments
Can you paste your configurations? |
APP_NAME = Gitea
RUN_USER = git
RUN_MODE = prod
WORK_PATH = /path/to/gitea
[server]
DOMAIN = example.com
ROOT_URL = https://example.com/
HTTP_PORT = 3000
DISABLE_SSH = false
SSH_DOMAIN = %(DOMAIN)s
SSH_PORT = 22
OFFLINE_MODE = false
LFS_START_SERVER = true
LFS_JWT_SECRET = secret1
[database]
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gitea
USER = gitea
PASSWD = secret2
LOG_SQL = false
[security]
INSTALL_LOCK = true
SECRET_KEY = secret3
INTERNAL_TOKEN = secret4
LOGIN_REMEMBER_DAYS = 14
COOKIE_USERNAME = gitea_awesome
COOKIE_REMEMBER_NAME = gitea_incredible
PASSWORD_HASH_ALGO = pbkdf2
[oauth2]
ENABLE = true
JWT_SECRET = secret5
[log]
MODE = console
LEVEL = Error
logger.router.MODE = ,
[git]
PATH =
[service]
REGISTER_EMAIL_CONFIRM = true
ENABLE_NOTIFY_MAIL = true
ENABLE_CAPTCHA = true
REQUIRE_CAPTCHA_FOR_LOGIN = true
CAPTCHA_TYPE = cfturnstile
CF_TURNSTILE_SITEKEY = secret6
CF_TURNSTILE_SECRET = secret7
DEFAULT_KEEP_EMAIL_PRIVATE = true
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_USER_IS_RESTRICTED = false
ENABLE_USER_HEATMAP = true
ENABLE_TIMETRACKING = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = hidemail.example.com
SHOW_REGISTRATION_BUTTON = true
[indexer]
ISSUE_INDEXER_NAME = gitea_issues
REPO_INDEXER_ENABLED = true
REPO_INDEXER_NAME = gitea_codes
[mailer]
ENABLED = true
SUBJECT_PREFIX = Gitea
SMTP_ADDR = smtp.example.com
SMTP_PORT = 587
FROM = "Gitea" <[email protected]>
USER = username
PASSWD = secret8
[session]
PROVIDER = db
COOKIE_NAME = gitea_session
COOKIE_SECURE = true
[picture]
GRAVATAR_SOURCE = https://example.com/gravatar/
ENABLE_FEDERATED_AVATAR = true
[attachment]
ENABLED = true
MAX_SIZE = 4
MAX_FILES = 3
STORAGE_TYPE = minio
SERVE_DIRECT = false
PATH = data/attachments
MINIO_ENDPOINT = 127.0.0.1:9000
MINIO_ACCESS_KEY_ID = secret9
MINIO_SECRET_ACCESS_KEY = secret10
MINIO_BUCKET = gitea
MINIO_LOCATION = global
MINIO_BASE_PATH = attachments/
MINIO_USE_SSL = false
MINIO_INSECURE_SKIP_VERIFY = true
MINIO_CHECKSUM_ALGORITHM = default
[i18n]
LANGS = en-US,zh-CN
NAMES = English,简体中文
[other]
SHOW_FOOTER_VERSION = false
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false
ENABLE_SITEMAP = true
ENABLE_FEED = true
[packages]
ENABLED = true
STORAGE_TYPE = minio
MINIO_BASE_PATH = packages/
CHUNKED_UPLOAD_PATH = tmp/package-upload
[storage]
STORAGE_TYPE = minio
[repo-archive]
MINIO_BASE_PATH = repo-archive/
[storage.repo-archive]
STORAGE_TYPE = minio
[lfs]
STORAGE_TYPE = minio
PATH = data/lfs
MINIO_BASE_PATH = lfs/
[storage.packages]
STORAGE_TYPE = minio
[storage.my_minio]
STORAGE_TYPE = minio
MINIO_ENDPOINT = 127.0.0.1:9000
MINIO_ACCESS_KEY_ID = secret9
MINIO_SECRET_ACCESS_KEY = secret10
MINIO_BUCKET = gitea
MINIO_LOCATION = global
MINIO_USE_SSL = false
MINIO_INSECURE_SKIP_VERIFY = true
[actions]
ENABLED = true
DEFAULT_ACTIONS_URL = github
[storage.actions_log]
STORAGE_TYPE = minio |
All STORAGE_TYPE = minio should be STORAGE_TYPE = my_minio |
[attachment]
;; Storage type for attachments, `local` for local disk or `minio` for s3 compatible
;; object storage service, default is `local`.
STORAGE_TYPE = minio Does it need to be changed here too? |
|
According to your configurations, I guess you can remove all related storage configuration and just leave one like below. [storage]
STORAGE_TYPE = minio
MINIO_ENDPOINT = 127.0.0.1:9000
MINIO_ACCESS_KEY_ID = secret9
MINIO_SECRET_ACCESS_KEY = secret10
MINIO_BUCKET = gitea
MINIO_LOCATION = global
MINIO_USE_SSL = false
MINIO_INSECURE_SKIP_VERIFY = true |
When I run |
Is it possible to communicate further via QQ(1290147055)? This makes it easier to pinpoint why this error occurs. |
It seems that I'm unable to add you as a QQ friend (Privacy settings don't allow friending). |
I forgot to turn off my privacy settings, it should work now |
|
The problem is caused by the user's improper use of the |
Description
When all data storage methods are set to
minio
, an errorrouters/init.go:60:mustInit() [F] code.gitea.io/gitea/modules/storage.Init failed: permission denied
is reported at startup.I've given the appropriate permissions, but the bottom line is that when I start Gitea with the root user by changing the code to bypass the restrictions, it still reports this error.
Gitea Version
1.20.3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.25.1
Operating System
Ubuntu 20.04
How are you running Gitea?
I compiled Gitea myself by downloading the source code and following the documentation, and this happens both when running it manually and using systemd.
Database
MySQL/MariaDB
The text was updated successfully, but these errors were encountered: