go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44k stars 5.4k forks source link

Push failed with 2Factor auth enable #26191

Open rardcode opened 1 year ago

rardcode commented 1 year ago

Description

Push error with 2mfa enabled and login with username and token generated.

Error

~/.local/git/git.miodominio.it/test> git add --force -- "File di testo.txt"
~/.local/git/git.miodominio.it/test> git commit --file=/tmp/smartgit15090784318953327437/commit4505494097593145948.tmp -o -- "File di testo.txt"
[main be83157] asdf
 1 file changed, 1 insertion(+)
 create mode 100644 File di testo.txt
~/.local/git/git.miodominio.it/test> git push --porcelain --progress origin refs/heads/main:refs/heads/main
remote: Verify
Authentication failed for 'https://git.miodominio.it/user/test.git/'

Gitea Version

1.20.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Linux Manjaro

How are you running Gitea?

I'm running Gitea in docker

Database

SQLite

mareksm commented 1 month ago

The same problem now after upgrade to 1.22.1

techknowlogick commented 1 month ago

@mareksm can you confirm the permissions you've given to the token?

mareksm commented 1 month ago

All set to read-write.