How do I force git to prompt for credentials?

前端 未结 1 960
别那么骄傲
别那么骄傲 2021-01-13 03:39

Weeks ago (and in a fog), I needed to make some changes to something hosted at github. I was directed by someone-who-knows-more-than-me (SWKMTM) via phone on exactly what t

相关标签:
1条回答
  • 2021-01-13 04:08

    user.name and user.email have nothing to do with credentials, they are just strings that are put into each commit you make to store your authorship information.

    Git normally authenticates you via SSH, so you have to either copy your SSH private key from the other machine to your new client, or create a new key pair and add the public part to your github profile.


    OK, after extensive discussion in the chat it turns out that Git was using the osxkeychain credential helper which provided previously stored credentials.

    Remove your stored credentials from your OSX keychain or disable the crendential helper (credential.helper config option) in Git to be prompted for authentication again.

    0 讨论(0)
提交回复
热议问题