
See commit 4c5971e () by Jeff King ( peff). In that case, use Git 2.27 (Q2 2020), because the parsing of URL for the credential helper has been corrected. More generally, you can use eHttpPath to split credential management for multiple repositories run by the same host. That's needlessly verbose, but this answer shows how: git config -global eHttpPath true Technically, you can force yourself to separately add credentials for every single remote repository. Then, repositories for the host will default to a shared host-credential, but this repository will use the full URL path for saving and loading its credential. If so, you may as well drop the hostname, too: git config eHttpPath true
Īs rjmunro notes, you can drop -global to use the path for only the current repository. You can see it for yourself in etc/gitconfig in your install location. Git for Windows enables useHttpPath for Azure Repos right out of the box. To set the option for all Bitbucket remote URLs, run this: git config -global credential. This is often the most useful mode for useHttpPath. But if you have different URLs for separate remotes, it should work fine, even from a single local repository. This second method does not work if you want to use different remote credentials for the exact same remote. (This setting comes from Git itself, not GCM.) Tells Git to pass the entire repository URL, rather than just the hostname, when calling out to a credential provider. Git Credential Manager can select a credential based on the full URL, rather than sharing them by hostname. The technique works on GitHub as well, but other repository hosts may not support it. Since the URL is technically different, you can add both your work and personal forks as remotes for the same repository if you want to. On Bitbucket, you can add a username to the HTTPS URL of your remote:
