I need to have multiple keys in my client to access two different accounts on Repository hosting. See https://redefy.repositoryhosting.com/support -> How do I manage multiple accounts with multiple keypairs on my client?
I do not understand how to change between different ssh keys in Git on Windows, can anybody help me?
I assume you use git bash and openssh.
Like what it’s written in the article, you can make a configuration file for ssh client that lists all of your accounts. You can write the following configuration in your own ssh client configuration file in
~/.ssh/configWhat it says is you define two, kind of, “host aliases” named
account-oneandaccount-two. If you use them, when making connection, the ssh client will use the correspondingHostName,User, andIdentityFilefor the server address, username, and ssh key file. With this you can use them to access your accounts and keys at even the same server.In git, you can define two remotes using them
then you can push to those remotes