A simple way is to generate a personal access token instead.
We can generate a token through this url https://github.com/settings/tokens/new?scopes=repo,admin:repo_hook. Modify the scopes to make sure it will only do the limit actions.
And then, we may get string seems like 9927d2878ffa105fc5236c762f2fd7zfd28b841d.
If we wish to push a few commits to your repository. Instead of
git push firstname.lastname@example.org:org-name/project-name.git
We can use this command:
git push https://email@example.com/org-name/project-name.git
If we are running in a ci. A simple way is to set 9927d2878ffa105fc5236c762f2fd7zfd28b841d as a environment variable. Let's name it as "GH_TOKEN".
We can write
git push https://$GH_TOKEN@github.com/org-name/project-name.git
in our CI scripts.