Closed haq1an closed 9 months ago
The most likely reason is that you lost your SECRET_KEY, then the data in database can't be decrypted.
Or your login_source
table is corrupted (which it unlikely according to your log)
You need to fix it manually: check your login_source
table records, find base64-encoded encrypted value, set them to empty string.
The most likely reason is that you lost your SECRET_KEY, then the data in database can't be decrypted.
Or your
login_source
table is corrupted (which it unlikely according to your log)You need to fix it manually: check your
login_source
table records, find base64-encoded encrypted value, set them to empty string.
It works, really appreciate it man!
Description
What I did before the issue:
Then I get 500 Internal Error performing below actions:
2023/11/15 14:52:18 ...s/web/admin/users.go:224:prepareUserInfo() [E] [65546aa2] auth.GetSourceByID: failed to decrypt by secret, the key (maybe SECRET_KEY?) might be incorrect: AesDecrypt invalid decrypted base64 string: illegal base64 data at input byte 1 2023/11/15 14:52:18 [65546aa2] router: completed GET /admin/users/30 for 10.24.30.64:49456, 500 Internal Server Error in 3.5ms @ admin/users.go:254(admin.EditUser)
2023/11/15 14:58:33 ...ers/web/auth/auth.go:224:SignInPost() [E] [65546c19] UserSignIn: failed to decrypt by secret, the key (maybe SECRET_KEY?) might be incorrect: AesDecrypt invalid decrypted base64 string: illegal base64 data at input byte 1 2023/11/15 14:58:33 [65546c19] router: completed POST /user/login for 10.24.30.64:49585, 500 Internal Server Error in 2.5ms @ auth/auth.go:170(auth.SignInPost)
APP_NAME = Gitea:example RUN_MODE = prod RUN_USER = git
[repository] ROOT = /data/git/repositories
[repository.local] LOCAL_COPY_PATH = /data/gitea/tmp/local-repo
[repository.upload] TEMP_PATH = /data/gitea/uploads
[server] APP_DATA_PATH = /data/gitea DOMAIN = git-test.dev.example.com SSH_DOMAIN = git-test.dev.example.com HTTP_PORT = 3000 ROOT_URL = https://git-test.dev.example.com/ DISABLE_SSH = false SSH_PORT = 22 SSH_LISTEN_PORT = 22 LFS_START_SERVER = true LFS_CONTENT_PATH = /data/git/lfs LFS_JWT_SECRET = ....secretsecretsecretsecretsecretsecret.... OFFLINE_MODE = false
[database] PATH = /data/gitea/gitea.db DB_TYPE = postgres HOST = 127.0.0.1:5432 NAME = gitea USER = gitea PASSWD = password LOG_SQL = false SCHEMA = SSL_MODE = disable CHARSET = utf8
[indexer] ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
[session] PROVIDER_CONFIG = /data/gitea/sessions PROVIDER = file GC_INTERVAL_TIME = 604800 SESSION_LIFE_TIME = 604800
[picture] AVATAR_UPLOAD_PATH = /data/gitea/avatars REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars DISABLE_GRAVATAR = true ENABLE_FEDERATED_AVATAR = true
[attachment] PATH = /data/gitea/attachments
[log] MODE = file,console LEVEL = info LOG_ROTATE = true DAILY_ROTATE = true MAX_DAYS = 90 ROUTER = console, ROOT_PATH = /data/gitea/log FILE_NAME = /data/gitea/log/access.log ENABLE_ACCESS_LOG = true
[log.console] MODE = console LEVEL = info FLAGS = stdflags COLORIZE = true
[security] INSTALL_LOCK = true SECRET_KEY = ....secretsecretsecretsecretsecretsecret.... REVERSE_PROXY_LIMIT = 1 REVERSE_PROXY_TRUSTED_PROXIES = * INTERNAL_TOKEN = ....secretsecretsecretsecretsecretsecret.... PASSWORD_HASH_ALGO = pbkdf2
[service] DISABLE_REGISTRATION = false REQUIRE_SIGNIN_VIEW = false REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = true ALLOW_ONLY_EXTERNAL_REGISTRATION = false ENABLE_CAPTCHA = false DEFAULT_KEEP_EMAIL_PRIVATE = false DEFAULT_ALLOW_CREATE_ORGANIZATION = false DEFAULT_ENABLE_TIMETRACKING = false NO_REPLY_ADDRESS =
[oauth2] JWT_SECRET = ....secretsecretsecretsecretsecretsecret....
[webhook] ALLOWED_HOST_LIST = example.com PAGING_NUM = 30
[openid] ENABLE_OPENID_SIGNIN = false ENABLE_OPENID_SIGNUP = false
[cron.sync_external_users] RUN_AT_START = true SCHEDULE = @every 24h UPDATE_EXISTING = false
[migrations] ALLOW_LOCALNETWORKS = true ALLOWED_DOMAINS = example.com