Using a Mac
git config -l shows the user I want to use
I still get permission denied for another user I've been using.
The user git is using is in the keychain. Can be found by accessing Keychain Access
After removing the unwanted user from the keychain, my git command worked with the right user