Gitea: Internal Server Error - invalid character '<' looking for beginning of value #5378

Closed
opened 2025-11-02 06:23:02 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @oaxiento on GitHub (May 11, 2020).

  • Gitea version (or commit ref):
  • Git version: 1.8.3.1
  • Operating system: CentOS 7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I upgraded vom Gitea 1.10.4 to 1.11.5. When pushing to a repository after the upgrade I get

[user@linux]$ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 2 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 250 bytes | 250.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Gitea: Internal Server Error
remote: invalid character '<' looking for beginning of value
To https://git.example.com/repo.git
   55655f0..cc77ac2  master -> master

As far as I can see, this is happening only to repos that existed before the upgrade. Repos that where created after the upgrade do not show this error. Here's what I see in the logs (some info got removed for privacy):

2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: dbde5c1d1cd5fa8a
2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: oAJLiWQyy7d4xONWU2OIRUvdgro6MTU4OTE5MDMzOTYwNDY1OTM4OA
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:119:dial() [T] Dialing LDAP with security protocol (1) without verifying: false
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:217:SearchEntry() [T] LDAP will use BindDN.
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:227:SearchEntry() [T] Bound as BindDN CN=binduser,OU=serviceaccounts,OU=administration,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:86:findUserDN() [T] Search for LDAP user: USERNAME
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:94:findUserDN() [T] Searching for DN FILTER REMOVED
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:145:bindUser() [T] Binding with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:151:bindUser() [T] Bound successfully with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:258:SearchEntry() [T] Fetching attributes 'sAMAccountName', 'givenName', 'sn', 'mail', '' FILTER REMOVED
2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: e39256ce1671a1dc
2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: ZEkABh2r8RPSR2VCQVNfjV3fbTU6MTU4OTE5MDMzOTYxOTExNDk3NA
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:119:dial() [T] Dialing LDAP with security protocol (1) without verifying: false
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:217:SearchEntry() [T] LDAP will use BindDN.
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:227:SearchEntry() [T] Bound as BindDN CN=binduser,OU=serviceaccounts,OU=administration,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:86:findUserDN() [T] Search for LDAP user: USERNAME
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:94:findUserDN() [T] Searching for DN FILTER REMOVED
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:145:bindUser() [T] Binding with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:151:bindUser() [T] Bound successfully with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:258:SearchEntry() [T] Fetching attributes 'sAMAccountName', 'givenName', 'sn', 'mail', '' FILTER REMOVED
2020/05/11 11:45:39 ...s/repo_permission.go:154:func1() [T] Permission Loaded for 824733980192:USERNAME in 824733980320:ORGANISATION/repository:
	Permissions: AccessMode: 824733981216:owner, 5 Units, 0 UnitsMode(s): [ 
	Units[0]: ID: 824733980416 RepoID: 824733980448 Type: 824733981264:UnitTypeCode Config: {}
	Units[1]: ID: 824733980512 RepoID: 824733980544 Type: 824733981296:UnitTypeIssues Config: {"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":true}
	Units[2]: ID: 824733980624 RepoID: 824733980672 Type: 824733981344:UnitTypePullRequests Config: {"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true}
	Units[3]: ID: 824733980784 RepoID: 824733980928 Type: 824733981392:UnitTypeReleases Config: {}
	Units[4]: ID: 824733981088 RepoID: 824733981136 Type: 824733981456:UnitTypeWiki Config: {} ]
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:119:dial() [T] Dialing LDAP with security protocol (1) without verifying: false
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:217:SearchEntry() [T] LDAP will use BindDN.
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:227:SearchEntry() [T] Bound as BindDN CN=binduser,OU=serviceaccounts,OU=administration,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:86:findUserDN() [T] Search for LDAP user: USERNAME
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:94:findUserDN() [T] Searching for DN FILTER REMOVED
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:145:bindUser() [T] Binding with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:151:bindUser() [T] Bound successfully with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:258:SearchEntry() [T] Fetching attributes 'sAMAccountName', 'givenName', 'sn', 'mail', '' FILTER REMOVED
2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: 217538a0376bb9e4
2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: m866RblR5O68bONmrQNxnZJXgQo6MTU4OTE5MDMzOTY4NTE4ODU5NA
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:119:dial() [T] Dialing LDAP with security protocol (1) without verifying: false
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:217:SearchEntry() [T] LDAP will use BindDN.
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:227:SearchEntry() [T] Bound as BindDN CN=binduser,OU=serviceaccounts,OU=administration,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:86:findUserDN() [T] Search for LDAP user: USERNAME
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:94:findUserDN() [T] Searching for DN FILTER REMOVED
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:145:bindUser() [T] Binding with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:151:bindUser() [T] Bound successfully with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org
2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:258:SearchEntry() [T] Fetching attributes 'sAMAccountName', 'givenName', 'sn', 'mail', '' FILTER REMOVED
2020/05/11 11:45:39 ...s/repo_permission.go:154:func1() [T] Permission Loaded for 824730834032:USERNAME in 824730834272:ORGANISATION/repository:
	Permissions: AccessMode: 824730836000:owner, 5 Units, 0 UnitsMode(s): [ 
	Units[0]: ID: 824730834624 RepoID: 824730834800 Type: 824730836096:UnitTypeCode Config: {}
	Units[1]: ID: 824730834912 RepoID: 824730835008 Type: 824730836160:UnitTypeIssues Config: {"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":true}
	Units[2]: ID: 824730835296 RepoID: 824730835408 Type: 824730836240:UnitTypePullRequests Config: {"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true}
	Units[3]: ID: 824730835616 RepoID: 824730835680 Type: 824730836304:UnitTypeReleases Config: {}
	Units[4]: ID: 824730835824 RepoID: 824730835904 Type: 824730836352:UnitTypeWiki Config: {} ]
2020/05/11 11:45:39 ...s/auth/sso/oauth2.go:97:userIDFromToken() [E] GetAccessTokenBySHA: access token does not exist [sha: hharei6doo6tei5aec7uQu9ogh7liek8aaquahnie2oogeo8ieghah5pai5eimoa7ISiu7sa7Aet6wa3thi4ioNg4ahviepuphigeiKoZ]
2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: 0eb9dfe3b129c9d4
2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: pWf4yBdzjjFOZ4zYfuuQO1OSTtQ6MTU4OTE5MDMzOTgzMzAzNjI2Mg
2020/05/11 11:45:39 routers/repo/http.go:103:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: api, keyid: 0]
2020/05/11 11:45:39 ...s/context/context.go:139:HTML() [D] Template: status/404
2020/05/11 11:45:39 ...s/auth/sso/oauth2.go:97:userIDFromToken() [E] GetAccessTokenBySHA: access token does not exist [sha: hharei6doo6tei5aec7uQu9ogh7liek8aaquahnie2oogeo8ieghah5pai5eimoa7ISiu7sa7Aet6wa3thi4ioNg4ahviepuphigeiKoZ]
2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: b2fca1ecc7403c04
2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: qYMFm4YKqUFOAaG_OY-DNJH6iBU6MTU4OTE5MDMzOTk0MjI0MTM0Ng
2020/05/11 11:45:39 routers/repo/http.go:103:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: api, keyid: 0]
2020/05/11 11:45:39 ...s/context/context.go:139:HTML() [D] Template: status/404
Originally created by @oaxiento on GitHub (May 11, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): - Git version: 1.8.3.1 - Operating system: CentOS 7 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description I upgraded vom Gitea 1.10.4 to 1.11.5. When pushing to a repository after the upgrade I get ``` [user@linux]$ git push Enumerating objects: 3, done. Counting objects: 100% (3/3), done. Delta compression using up to 2 threads Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 250 bytes | 250.00 KiB/s, done. Total 2 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Gitea: Internal Server Error remote: invalid character '<' looking for beginning of value To https://git.example.com/repo.git 55655f0..cc77ac2 master -> master ``` As far as I can see, this is happening only to repos that existed before the upgrade. Repos that where created after the upgrade do not show this error. Here's what I see in the logs (some info got removed for privacy): ``` 2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: dbde5c1d1cd5fa8a 2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: oAJLiWQyy7d4xONWU2OIRUvdgro6MTU4OTE5MDMzOTYwNDY1OTM4OA 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:119:dial() [T] Dialing LDAP with security protocol (1) without verifying: false 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:217:SearchEntry() [T] LDAP will use BindDN. 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:227:SearchEntry() [T] Bound as BindDN CN=binduser,OU=serviceaccounts,OU=administration,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:86:findUserDN() [T] Search for LDAP user: USERNAME 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:94:findUserDN() [T] Searching for DN FILTER REMOVED 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:145:bindUser() [T] Binding with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:151:bindUser() [T] Bound successfully with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:258:SearchEntry() [T] Fetching attributes 'sAMAccountName', 'givenName', 'sn', 'mail', '' FILTER REMOVED 2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: e39256ce1671a1dc 2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: ZEkABh2r8RPSR2VCQVNfjV3fbTU6MTU4OTE5MDMzOTYxOTExNDk3NA 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:119:dial() [T] Dialing LDAP with security protocol (1) without verifying: false 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:217:SearchEntry() [T] LDAP will use BindDN. 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:227:SearchEntry() [T] Bound as BindDN CN=binduser,OU=serviceaccounts,OU=administration,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:86:findUserDN() [T] Search for LDAP user: USERNAME 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:94:findUserDN() [T] Searching for DN FILTER REMOVED 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:145:bindUser() [T] Binding with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:151:bindUser() [T] Bound successfully with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:258:SearchEntry() [T] Fetching attributes 'sAMAccountName', 'givenName', 'sn', 'mail', '' FILTER REMOVED 2020/05/11 11:45:39 ...s/repo_permission.go:154:func1() [T] Permission Loaded for 824733980192:USERNAME in 824733980320:ORGANISATION/repository: Permissions: AccessMode: 824733981216:owner, 5 Units, 0 UnitsMode(s): [ Units[0]: ID: 824733980416 RepoID: 824733980448 Type: 824733981264:UnitTypeCode Config: {} Units[1]: ID: 824733980512 RepoID: 824733980544 Type: 824733981296:UnitTypeIssues Config: {"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":true} Units[2]: ID: 824733980624 RepoID: 824733980672 Type: 824733981344:UnitTypePullRequests Config: {"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true} Units[3]: ID: 824733980784 RepoID: 824733980928 Type: 824733981392:UnitTypeReleases Config: {} Units[4]: ID: 824733981088 RepoID: 824733981136 Type: 824733981456:UnitTypeWiki Config: {} ] 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:119:dial() [T] Dialing LDAP with security protocol (1) without verifying: false 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:217:SearchEntry() [T] LDAP will use BindDN. 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:227:SearchEntry() [T] Bound as BindDN CN=binduser,OU=serviceaccounts,OU=administration,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:86:findUserDN() [T] Search for LDAP user: USERNAME 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:94:findUserDN() [T] Searching for DN FILTER REMOVED 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:145:bindUser() [T] Binding with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:151:bindUser() [T] Bound successfully with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:258:SearchEntry() [T] Fetching attributes 'sAMAccountName', 'givenName', 'sn', 'mail', '' FILTER REMOVED 2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: 217538a0376bb9e4 2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: m866RblR5O68bONmrQNxnZJXgQo6MTU4OTE5MDMzOTY4NTE4ODU5NA 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:119:dial() [T] Dialing LDAP with security protocol (1) without verifying: false 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:217:SearchEntry() [T] LDAP will use BindDN. 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:227:SearchEntry() [T] Bound as BindDN CN=binduser,OU=serviceaccounts,OU=administration,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:86:findUserDN() [T] Search for LDAP user: USERNAME 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:94:findUserDN() [T] Searching for DN FILTER REMOVED 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:145:bindUser() [T] Binding with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:151:bindUser() [T] Bound successfully with userDN: CN=Surname\, Firstname,OU=Standard,OU=Benutzer,OU=Benutzer und Computer,DC=example,DC=company,DC=org 2020/05/11 11:45:39 ...es/auth/ldap/ldap.go:258:SearchEntry() [T] Fetching attributes 'sAMAccountName', 'givenName', 'sn', 'mail', '' FILTER REMOVED 2020/05/11 11:45:39 ...s/repo_permission.go:154:func1() [T] Permission Loaded for 824730834032:USERNAME in 824730834272:ORGANISATION/repository: Permissions: AccessMode: 824730836000:owner, 5 Units, 0 UnitsMode(s): [ Units[0]: ID: 824730834624 RepoID: 824730834800 Type: 824730836096:UnitTypeCode Config: {} Units[1]: ID: 824730834912 RepoID: 824730835008 Type: 824730836160:UnitTypeIssues Config: {"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":true} Units[2]: ID: 824730835296 RepoID: 824730835408 Type: 824730836240:UnitTypePullRequests Config: {"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true} Units[3]: ID: 824730835616 RepoID: 824730835680 Type: 824730836304:UnitTypeReleases Config: {} Units[4]: ID: 824730835824 RepoID: 824730835904 Type: 824730836352:UnitTypeWiki Config: {} ] 2020/05/11 11:45:39 ...s/auth/sso/oauth2.go:97:userIDFromToken() [E] GetAccessTokenBySHA: access token does not exist [sha: hharei6doo6tei5aec7uQu9ogh7liek8aaquahnie2oogeo8ieghah5pai5eimoa7ISiu7sa7Aet6wa3thi4ioNg4ahviepuphigeiKoZ] 2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: 0eb9dfe3b129c9d4 2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: pWf4yBdzjjFOZ4zYfuuQO1OSTtQ6MTU4OTE5MDMzOTgzMzAzNjI2Mg 2020/05/11 11:45:39 routers/repo/http.go:103:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: api, keyid: 0] 2020/05/11 11:45:39 ...s/context/context.go:139:HTML() [D] Template: status/404 2020/05/11 11:45:39 ...s/auth/sso/oauth2.go:97:userIDFromToken() [E] GetAccessTokenBySHA: access token does not exist [sha: hharei6doo6tei5aec7uQu9ogh7liek8aaquahnie2oogeo8ieghah5pai5eimoa7ISiu7sa7Aet6wa3thi4ioNg4ahviepuphigeiKoZ] 2020/05/11 11:45:39 ...s/context/context.go:330:func1() [D] Session ID: b2fca1ecc7403c04 2020/05/11 11:45:39 ...s/context/context.go:331:func1() [D] CSRF Token: qYMFm4YKqUFOAaG_OY-DNJH6iBU6MTU4OTE5MDMzOTk0MjI0MTM0Ng 2020/05/11 11:45:39 routers/repo/http.go:103:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: api, keyid: 0] 2020/05/11 11:45:39 ...s/context/context.go:139:HTML() [D] Template: status/404 ```
Author
Owner

@hiliev commented on GitHub (May 20, 2020):

Same thing happened to me after migration from 1.10.4 (hand compiled from source) to 1.11.5 (compiled from source by the FreeBSD ports system). It seems the database migration fails to add some needed service entry in the "user" table. I'm using PostgreSQL 9.5.21 on FreeBSD 11.3-RELEASE-p9.

@hiliev commented on GitHub (May 20, 2020): Same thing happened to me after migration from 1.10.4 (hand compiled from source) to 1.11.5 (compiled from source by the FreeBSD ports system). ~~It seems the database migration fails to add some needed service entry in the `"user"` table.~~ I'm using PostgreSQL 9.5.21 on FreeBSD 11.3-RELEASE-p9.
Author
Owner

@hiliev commented on GitHub (May 21, 2020):

Never mind, found the culprit in my case. As part of the upgrade, the location of the gitea executable and the custom app.ini file changed to where the FreeBSD port places them. There are three hooks in the "bad" repository that have the original paths to gitea and to app.ini hard-coded in them:

$ROOT/myuser/repo.git/hooks/post-receive.d/gitea
$ROOT/myuser/repo.git/hooks/pre-receive.d/gitea
$ROOT/myuser/repo.git/hooks/update.d/gitea

Correcting the paths inside fixed the issue.

Turns out I hadn't run post migration the "Resynchronize pre-receive, update and post-receive hooks of all repositories." maintenance operation in Site Administration, which writes new hooks with the correct paths.

@hiliev commented on GitHub (May 21, 2020): Never mind, found the culprit in my case. As part of the upgrade, the location of the `gitea` executable and the custom `app.ini` file changed to where the FreeBSD port places them. There are three hooks in the "bad" repository that have the original paths to `gitea` and to `app.ini` hard-coded in them: $ROOT/myuser/repo.git/hooks/post-receive.d/gitea $ROOT/myuser/repo.git/hooks/pre-receive.d/gitea $ROOT/myuser/repo.git/hooks/update.d/gitea Correcting the paths inside fixed the issue. Turns out I hadn't run post migration the _"Resynchronize pre-receive, update and post-receive hooks of all repositories."_ maintenance operation in Site Administration, which writes new hooks with the correct paths.
Author
Owner

@oaxiento commented on GitHub (Jun 16, 2020):

Turns out I hadn't run post migration the "Resynchronize pre-receive, update and post-receive hooks of all repositories." maintenance operation in Site Administration, which writes new hooks with the correct paths.

Solved the issue! Thanks @hiliev

@oaxiento commented on GitHub (Jun 16, 2020): > Turns out I hadn't run post migration the _"Resynchronize pre-receive, update and post-receive hooks of all repositories."_ maintenance operation in Site Administration, which writes new hooks with the correct paths. Solved the issue! Thanks @hiliev
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5378