Open Remmert-PBE opened 4 days ago
I noticed the same issue using a similar setup (OIDC instead of LDAP). It works if tried again but some tools check the remote periodically and ask the user to login again if authentication fails.
It seems that this issue is similar to #30991?
Maybe OAUTH_USER
comes from here:
https://github.com/git-ecosystem/git-credential-manager/blob/e124b8bb8f4a53301e0d9d947c075519f75ff222/src/shared/Core/GenericOAuthConfig.cs#L143
I found a related issue ( maybe ) in GCM: https://github.com/git-ecosystem/git-credential-manager/issues/1408
Maybe this is a problem from upstream (not directly related) ?
@yp05327 Good find, thats exactly what happens on my system. I ran a GCM_TRACE a few days back and it is similar to the one in the gcm issue. In my log the first push ends with the command erase and only on the 2nd push a new token is saved.
See https://gist.github.com/Remmert-PBE/1ccecd8d82c4b19d700835bff1b3567b
Now the question is, which tool is at fault?
Description
The first authorization attempt after some hours fails, while the second one directly afterwards succeeds:
The gitea logfile shows that it tries to login with the user "OAUTH_USER" to our LDAP server, like it is saved by the Git Credential Manager:![Screenshot 2024-06-24 084634](https://github.com/go-gitea/gitea/assets/141999945/cab8ff9d-9ef7-48c3-8ba5-4e074e77f113)
The authorization after the initial error works for a few hours, but after a while it reappears (token becomes invalid?).
The credential settings in git are:
Gitea Version
1.21.11
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://gist.github.com/Remmert-PBE/959e1e243a2d8243a757aef754571270
Screenshots
No response
Git Version
git version 2.45.2.windows.1
Operating System
Windows Server 2019 Standard
How are you running Gitea?
Running as a service on a windows server. Behind a nginx reverse proxy (configured like the example in the gitea docs)
Database
MSSQL