This gist describes a method to set up git to read your github token from a file and automatically allow you to use commands like git push without eeding to provide the token every time.
You should understand that storing the token in plaintext in a relatively standard location could allow a savy adversary to steal it, and wreak havoc with your github account. But, hopefully you'd have the opportunity to revoke the token before they managed to do any harm, say after stealing your laptop.
Follow these official instructions This has so far on;y been shown to work with classic tokens.
In your home directory make a plain text file called .git-credentials and give it the following content
https://REPLACE_WITH_USERNAME:REPLACE_WITH_TOKEN@github.com
except of course, you should replace REPLACE_WITH_USERNAME with your github username and REPLACE_WITH_TOKEN with your token from step 1.
You can read more aobut this file here
In the repo that you want run commands that interact with GitHub with, run git config credential.helper store. This updates a file in your .git folder.
You could probably also configure this globally if you like.
Running something like git push should now "just work", witohut asking you for a password at all.