Gitea push using Token Auth

After updating my Gitea account to use 2FA, I could no longer push/pull from command line.

1. Create Gitea Token from GUI

Once you have a Gitea token, open the .git/config file:

Insert the token as follows: https://<token>@gitea.remote.tech.us

Afterwards, git push worked as expected without prompting for login.

One thought on “Gitea push using Token Auth”
  1. ** When you forget, and I know you will… **
    Open bitwarden and search for “Gitea API Token”
    username=earnhardt
    Take the password and paste into .git\config as shown above…

    —————————– PROOF —————————–

    E:\work\Sheetz\scripts>git push origin
    remote: Verify
    fatal: Authentication failed for ‘https://gitea.remote-tech.us/Sheetz/scripts.git/’

    E:\work\Sheetz\scripts>notepad .git\config

    E:\work\Sheetz\scripts>git push origin
    Enumerating objects: 9, done.
    Counting objects: 100% (9/9), done.
    Delta compression using up to 4 threads
    Compressing objects: 100% (4/4), done.
    Writing objects: 100% (8/8), 2.01 KiB | 412.00 KiB/s, done.
    Total 8 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
    remote: . Processing 1 references
    remote: Processed 1 references in total
    To https://gitea.remote-tech.us/Sheetz/scripts.git
    96db600..9ae545e main -> main

Leave a Reply