Skip to content

error GetAccessTokenBySHA access token does not exist #11945

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

Closed
2 of 7 tasks
fragfutter opened this issue Jun 18, 2020 · 3 comments · Fixed by #12387
Closed
2 of 7 tasks

error GetAccessTokenBySHA access token does not exist #11945

fragfutter opened this issue Jun 18, 2020 · 3 comments · Fixed by #12387

Comments

@fragfutter
Copy link
Contributor

  • 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]
@oaxiento
Copy link

oaxiento commented Jul 29, 2020

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

@zeripath
Copy link
Contributor

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 added a commit to zeripath/gitea that referenced this issue Jul 31, 2020
@oaxiento
Copy link

Great @zeripath! Thanks!

techknowlogick added a commit that referenced this issue Aug 1, 2020
* Fix incorrect logging in oauth2.go

Fix #11945

Signed-off-by: Andrew Thornton <[email protected]>

* Handle ErrAlreadyInQueue in stats indexer

Fix #12380

Signed-off-by: Andrew Thornton <[email protected]>

* Fixes type in error message of indexer

Add the missing character in the error message.

Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lieven Hollevoet <[email protected]>
techknowlogick added a commit to techknowlogick/gitea that referenced this issue Aug 4, 2020
* Fix incorrect logging in oauth2.go

Fix go-gitea#11945

Signed-off-by: Andrew Thornton <[email protected]>

* Handle ErrAlreadyInQueue in stats indexer

Fix go-gitea#12380

Signed-off-by: Andrew Thornton <[email protected]>

* Fixes type in error message of indexer

Add the missing character in the error message.

Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lieven Hollevoet <[email protected]>
lunny pushed a commit that referenced this issue Aug 4, 2020
)

* Fix incorrect logging in oauth2.go

Fix #11945

Signed-off-by: Andrew Thornton <[email protected]>

* Handle ErrAlreadyInQueue in stats indexer

Fix #12380

Signed-off-by: Andrew Thornton <[email protected]>

* Fixes type in error message of indexer

Add the missing character in the error message.

Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lieven Hollevoet <[email protected]>

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lieven Hollevoet <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants