There is such a confusion on this question, as there is way too much complexity in this question. First MacOS vs. Win10. Then the different auth mechanisms.
I will start a consolidated answer here and probably need some help, if I do not get help, I will keep working on the answer until it is complete, but that will take time.
Windows 10: |
|-- Run this command. You will be prompted on next push/pull to enter username and password:
| git config --global credential.helper wincred (Thanks to @Andrew Pye)
`
MacOS:
|
|-- Using git config to store username and password:
| git config --global --add user.password
|
|---- first time entry
| git config --global --add user.password <new_pass>
|
|---- password update
| git config --global --unset user.password
| git config --global --add user.password <new_pass>
|
|-- Using keychain:
| git config --global credential.helper osxkeychain
|
|---- first time entry
| Terminal will ask you for the username and password. Just enter it, it will be
| stored in keychain from then on.
|
|---- password update
| Open keychain, delete the entry for the repository you are trying to use.
| (git remote -v will show you)
| On next use of git push or something that needs permissions, git will ask for
| the credentials, as it can not find them in the keychain anymore.
`