I have multiple github accounts, and frequently update each repos from these different accounts. The default github tools config on windows stores a single logon in the Windows Credential Manager (WCM). Attempting to access a repo which that logon doesn’t have access to leads to a permissions error.

I was working around this by starting the WCM and finding and deleting the github credential whenever I needed to switche accounts. But I’ve now found an easier fix here, running:

git config --global credential.github.com.useHttpPath true

This puts credentials in the WCM based on the repo path, so supports different accounts.

comments powered by Disqus