I've been using HTTPS but never have to type in my credentials.
That is probably because your credentials are already cached by a credential helper.
- Check what yours is:
git config --global credential.helper
- Check what credentials are stored:
In a Git bash session:
printf "host=github.com\nprotocol=https" | git-credential-xxx get
Replace xxx
by the value returned by git config --global credential.helper
.
If it is empty, and if the remote URL is an HTTPS one, then, as suggested by LeGEC in the comments, Git might still be using SSH anyway with an url.<base>.pushInsteadOf
directive.
Check that with:
git config --show-origin --list --show-scope | grep -i insteadOf
The OP adds in the comments:
running git config --show-origin --list
gives me, among other things, file:/Applications/Xcode.app/Contents/Developer/usr/share/git-core/gitconfig credential.helper=osxkeychain
So it could look like it is stored in my osxkeychain?
If that is the case:
printf "host=github.com\nprotocol=https" | git-credential-osxkeychain get
See also "Updating credentials from the macOS Keychain".