I need to connect to multiple Git servers with different credentials for my work. I have my personal repository [email protected], my office work repository [email protected] and my customer work repository [email protected]
I need to regularly access and push code to these different repositories with different credentials (which have access to the respective repositories)
How do I configure my git client (I am using git shell - powershell on Windows) to prompt me for user id and password everytime I connect to a remote repository? Ideally, I would prefer not to have to manage certificates.
Note: I have already set my global variables. Not able to unset it now.
If git bash is preferable over git shell, I am open to that as well. I just find git shell easier to deal with since I am used to Windows environment.
You can benefit from
.ssh/configto differ between your git accounts overssh. Pay attention how domains are different and keys are pointed:For e.g. to use
account1, make sure you set origin url orclonefromgithub.com-account-onein your local repository, proper login information will follow: