Configuring user and password with Git Bash
From Git Bash I prefer to run the command:
git config --global credential.helper wincred
At that point running a command like git pull
and entering your credentials one time should have it stored for future use. Git has a built-in credentials system that works in different OS environments. You can get more details here: 7.14 Git Tools - Credential Storage
Make sure you are using the SSH URL for the GitHub repository rather than the HTTPS URL. It will ask for username and password when you are using HTTPS and not SSH. You can check the file .git/config
or run git config -e
or git remote show origin
to verify the URL and change it if needed.
You can change the URL with: [1]
git remote set-url origin git+ssh://[email protected]/username/reponame.git
[1] This portion incorporates the answer to this question.