Multiple Git Account Credentials

less than 1 minute read

Handling multiple git accounts with different credentials

As mentioned in the credentials documentation

By default, Git does not consider the “path” component of an http URL to be worth matching via external helpers. This means that a credential stored for will also be used for

Setting the useHttpPath configuration option to true will change the default behavoir

git config --global credential.useHttpPath true

You will be prompted for passwords for existing repositories after this change