Last Updated on 21/08/2022
This post shows how to permanently authenticate with a Git repository, so you don’t need to type credentials when pushing to a remote.
Enable the credential storing:
git config --global credential.helper store
Then, attempt to push changes (if though everything is up-to-date) so the credentials are stored:
git push https://github.com/<your_username>/<your_repo>.git
Finally, provide the username and password/token when prompted.
For now on, the next time you push any changes you won’t be prompted to supply your credentials.
Hope it helps. Cya!
References
- Stack Overflow – Git push requires username and password