error GetAccessTokenBySHA access token does not exist #5571

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

Originally created by @fragfutter on GitHub (Jun 18, 2020).

  • Gitea version (or commit ref): 1.11.6
  • Git version: 2.18.4
  • Operating system: centos8
  • 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

if gitea is accessed by ssh it logs errors for GetAccessTokenBySHA

Gitea is configured with a single ldap authentication source. Oauth2 is disabled in app.ini.

Each access via ssh logs two errors. Tested with different users from different hosts and different repositories. Tested from localhost. The sha hash is always the same.

Error does not happen if accessed via http.

Tracelog

2020/06/18 10:26:43 modules/ssh/ssh.go:63:sessionHandler() 
     [T] SSH: Payload: git-upload-pack 'foo/bar.git'
2020/06/18 10:26:43 modules/ssh/ssh.go:66:sessionHandler() 
     [T] SSH: Arguments: [serv key-7 --config=/etc/gitea/app.ini]
2020/06/18 10:26:43 ...s/auth/sso/oauth2.go:97:userIDFromToken() 
     [E] GetAccessTokenBySHA: access token does not exist [sha: a6a81e36cd50d8c3d04ea95b0a565aeb]
Originally created by @fragfutter on GitHub (Jun 18, 2020). - Gitea version (or commit ref): 1.11.6 - Git version: 2.18.4 - Operating system: centos8 - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description if gitea is accessed by ssh it logs errors for GetAccessTokenBySHA Gitea is configured with a single ldap authentication source. Oauth2 is disabled in app.ini. Each access via ssh logs two errors. Tested with different users from different hosts and different repositories. Tested from localhost. The sha hash is always the same. Error does not happen if accessed via http. ## Tracelog ``` 2020/06/18 10:26:43 modules/ssh/ssh.go:63:sessionHandler() [T] SSH: Payload: git-upload-pack 'foo/bar.git' 2020/06/18 10:26:43 modules/ssh/ssh.go:66:sessionHandler() [T] SSH: Arguments: [serv key-7 --config=/etc/gitea/app.ini] 2020/06/18 10:26:43 ...s/auth/sso/oauth2.go:97:userIDFromToken() [E] GetAccessTokenBySHA: access token does not exist [sha: a6a81e36cd50d8c3d04ea95b0a565aeb] ```
Author
Owner

@oaxiento commented on GitHub (Jul 29, 2020):

We're having that exact same issue with version 1.12.3 when pushing via HTTP ... Any updates on this?

@oaxiento commented on GitHub (Jul 29, 2020): We're having that exact same issue with version 1.12.3 when pushing via HTTP ... Any updates on this?
Author
Owner

@zeripath commented on GitHub (Jul 31, 2020):

Ignore this -there is a mistake in the logging - these should not be being logged. I'll have a PR up imminently to fix the logging here.

@zeripath commented on GitHub (Jul 31, 2020): Ignore this -there is a mistake in the logging - these should not be being logged. I'll have a PR up imminently to fix the logging here.
Author
Owner

@oaxiento commented on GitHub (Jul 31, 2020):

Great @zeripath! Thanks!

@oaxiento commented on GitHub (Jul 31, 2020): Great @zeripath! Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5571