Authentication failed for, but running the command again works?

Sometimes my authentication with git on Windows is lost? I guess it happens after x amount of time has passed.
When it happens the command (fetch, pull, push etc) will fail with a error, but if I run the command immediately again it works.

image

How can I resolve this? I use HTTPS (not SSH) for communicating with Gitea.
Is it a setting somewhere within Gitea or is this a Git issue?

2 Likes

I found this setting here Config Cheat Sheet | Gitea Documentation
Increasing ACCESS_TOKEN_EXPIRATION_TIME to 24 hours from 1 hour does improve it.
It happens way less often now and it works for me.

2 Likes

I have exactly the same issue (and workaround). Just wondering what exactly is the cause, and if there is a proper solution.

1 Like

Same here. I guess it has something to do with the token refresh. Thats a pitty… I started to like gitea.

That is my guess as well, but since I’ve increase the value of ACCESS_TOKEN_EXPIRATION_TIME it’s barely noticeable for me at least :blush:
And I really like Gitea and will continue to use it.

Sure it would be nice if the refresh worked without first failing. I don’t know where the “issue” lies, is it within Gitea or the app that Git for Windows uses that you authorize? :person_shrugging:

All these happened in Windows?

For me, yes. I’m on Windows 11.

How about using GitHub - hickford/git-credential-oauth: A Git credential helper that securely authenticates to GitHub, GitLab and BitBucket using OAuth.

I also see this issue.
Is there a solution to this, or a fix scheduled?
Given it was reported 10 months ago, I’d expect it to at-least have been triaged.
It’s annoying enough that I’m considering switching to Gitlab if it won’t be acknowledged/fixed.

Environment
Gitea Server: Gitea Docker image, hosted on Debian
Client: Git for windows via Visual Studio 2022 on Windows 11
Using default authentication settings.

Has this issue been resolved?

Same at my gitea installation (as fatotaku described it).
Is this planned to be resolved?

is there any update, or Workaround ?

Again, same problem here in my instances with windows based git clients.

Any updates on this? :folded_hands: