Multiple git accounts setup

As a developer, you must come across this issue, If you try to check out multiple repositories from different git accounts by default git tries to check out from first account it won’t find the second repository in the first account, obviously

One option we have is that one git account (g1) as HTTP authentication and another as SSH authentication should solve the problem, but another approach is having the below option let to log in when checkout or clone of the new git repo

One parameter you need to set in your git to do the trick.

git config --global credential.useHttpPath true

Then clone your git repository, you are good to check out and clone any other repositories from different accounts

Leave a Reply

Your email address will not be published. Required fields are marked *

Enable Notifications OK No thanks