Search notes:

~/.git-credentials

Create a .git-credentials file

Windows - cmd.exe

It's possible in Windows to store the credentials (that is: the User Access Token (UAT)) for GitHub with something like
C:\> cmdkey /generic:git:https://github.com /user:ReneNyffenegger /pass:ghp_XXXX…
ghp_ is a Github Personal Access Token (PAT) which can be obtained with this link.

Linux - shell

The following shell commands try to demonstrate how a Personal Access Token for GitHub can be stored in Linux:
githubToken='ghp_…'
git config --global credential.helper store
echo "https://ReneNyffenegger:$githubToken@github.com" > ~/.git-credentials

TODO (this is old and very likely obsolete)

Windows

The following command sets the credentials for my github repositories.
C:\> echo https://ReneNyffenegger:ghp_…@github.com > %userprofile%\.git-credentials

See also

%UserProfile%\.git-credentials

Index