Gitea dump cannot unmarshal number #7854

Closed
opened 2025-11-02 07:39:17 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @wiryonolau on GitHub (Sep 16, 2021).

Gitea Version

1.14.5

Git Version

2.30.2

Operating System

No response

How are you running Gitea?

gitea/gitea:1.14.5-linux-amd64 docker image

Database

MySQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

Config file

APP_NAME = Gitea
RUN_USER = git
RUN_MODE = prod

[database]
DB_TYPE  = mysql
HOST     = mysql:3306
NAME     = gitea
USER     = gitea
PASSWD   = ********
SSL_MODE = disable
PATH     = data/gitea/data/gitea.db

[repository]
ROOT = /data/git/gitea-repositories

[server]
DOMAIN           = ********
HTTP_PORT        = 3000
ROOT_URL         = https://********/
DISABLE_SSH      = false
SSH_PORT         = 22
START_SSH_SERVER = false
OFFLINE_MODE     = false

[mailer]
ENABLED = false

[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL     = false
DISABLE_REGISTRATION   = true
ENABLE_CAPTCHA         = false
REQUIRE_SIGNIN_VIEW    = false

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = false

[session]
PROVIDER = file

[log]
MODE      = file
LEVEL     = Info
ROOT_PATH = /data/gitea/log

[security]
INSTALL_LOCK   = true
SECRET_KEY     = ********
INTERNAL_TOKEN = ********

[oauth2]
JWT_SECRET = ********

Command ( run inside docker )

su - git
cd /tmp
/app/gitea/gitea -c /data/gitea/conf/app.ini

Result

... 
2021/09/16 02:37:20 cmd/dump.go:267:runDump() [I] [SQL] SELECT `id`, `repo_id`, `branch_name`, `can_push`, `enable_whitelist`, `whitelist_user_i_ds`, `whitelist_team_i_ds`, `enable_merge_whitelist`, `whitelist_deploy_keys`, `merge_whitelist_user_i_ds`, `merge_whitelist_team_i_ds`, `enable_status_check`, `status_check_contexts`, `enable_approvals_whitelist`, `approvals_whitelist_user_i_ds`, `approvals_whitelist_team_i_ds`, `required_approvals`, `block_on_rejected_reviews`, `block_on_official_review_requests`, `block_on_outdated_branch`, `dismiss_stale_approvals`, `require_signed_commits`, `protected_file_patterns`, `created_unix`, `updated_unix` FROM `protected_branch` [] - 355.207µs
Failed to dump database: json: cannot unmarshal number into Go value of type []int64
2021/09/16 02:37:20 cmd/dump.go:150:fatal() [F] Failed to dump database: json: cannot unmarshal number into Go value of type []int64

Screenshots

No response

Originally created by @wiryonolau on GitHub (Sep 16, 2021). ### Gitea Version 1.14.5 ### Git Version 2.30.2 ### Operating System _No response_ ### How are you running Gitea? gitea/gitea:1.14.5-linux-amd64 docker image ### Database MySQL ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description Config file ```ini APP_NAME = Gitea RUN_USER = git RUN_MODE = prod [database] DB_TYPE = mysql HOST = mysql:3306 NAME = gitea USER = gitea PASSWD = ******** SSL_MODE = disable PATH = data/gitea/data/gitea.db [repository] ROOT = /data/git/gitea-repositories [server] DOMAIN = ******** HTTP_PORT = 3000 ROOT_URL = https://********/ DISABLE_SSH = false SSH_PORT = 22 START_SSH_SERVER = false OFFLINE_MODE = false [mailer] ENABLED = false [service] REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = false DISABLE_REGISTRATION = true ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = false [session] PROVIDER = file [log] MODE = file LEVEL = Info ROOT_PATH = /data/gitea/log [security] INSTALL_LOCK = true SECRET_KEY = ******** INTERNAL_TOKEN = ******** [oauth2] JWT_SECRET = ******** ``` Command ( run inside docker ) ``` su - git cd /tmp /app/gitea/gitea -c /data/gitea/conf/app.ini ``` Result ```bash ... 2021/09/16 02:37:20 cmd/dump.go:267:runDump() [I] [SQL] SELECT `id`, `repo_id`, `branch_name`, `can_push`, `enable_whitelist`, `whitelist_user_i_ds`, `whitelist_team_i_ds`, `enable_merge_whitelist`, `whitelist_deploy_keys`, `merge_whitelist_user_i_ds`, `merge_whitelist_team_i_ds`, `enable_status_check`, `status_check_contexts`, `enable_approvals_whitelist`, `approvals_whitelist_user_i_ds`, `approvals_whitelist_team_i_ds`, `required_approvals`, `block_on_rejected_reviews`, `block_on_official_review_requests`, `block_on_outdated_branch`, `dismiss_stale_approvals`, `require_signed_commits`, `protected_file_patterns`, `created_unix`, `updated_unix` FROM `protected_branch` [] - 355.207µs Failed to dump database: json: cannot unmarshal number into Go value of type []int64 2021/09/16 02:37:20 cmd/dump.go:150:fatal() [F] Failed to dump database: json: cannot unmarshal number into Go value of type []int64 ``` ### Screenshots _No response_
GiteaMirror added the type/bug label 2025-11-02 07:39:17 -06:00
Author
Owner

@zeripath commented on GitHub (Sep 16, 2021):

Upgrade to 1.14.7 and dump from there.

We released 1.14.7 specifically to fix this.

@zeripath commented on GitHub (Sep 16, 2021): Upgrade to 1.14.7 and dump from there. We released 1.14.7 specifically to fix this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7854