How to Connect Multiple Accounts of the Same Git Vendor Portal
As a developer, we often need to use multiple accounts of a single Git vendor simultaneously. It can happen when a client does not allow outside the organization accounts and signup a new Git account for you.
Terminologies
Git Repositories are a kind of version control used by developers to collaborate on a single project.
The git repository vendors provide two types of authentications, credentials via HTTP(S) and SSH.
It is the simplest method to clone the Git repo. It will ask for the user credentials while cloning the repo from a particular URL the first time and, on successful verification, stores it in the system globally.
It is another method to clone the Git repo. It needs an SSH key to be pre-configured in the vendor's portal.
Issues with HTTPS Authentication
When we clone a repository from a Git Vendor for the first time, we need to add credentials to authenticate. The valid credentials after authentication get saved in the system with the URL, so it has to be unique. It means we can stay connected to only one account at a time. When we need to share the Git account for committing the code, we need to share the same password we use to login into the portal. However, some vendors like GitHub and Azure DevOps have opted for separate credentials for cloning repositories.
So, is SSH the way to go?
Yes, we can use SSH to overcome the issues of HTTPS. Also, all the git vendors support it. When using SSH, there is no need to share the credentials of the portal.
领英推荐
Connect to Git via SSH
We can connect to a Git vis SSH from all available OS.
1. Prerequisite (For Windows Only)
By default, in Windows, the Open SSH service is disabled. We need to check that and update it if required.
To start the service