Yes, you are going to configure the GIT_SSH_COMMAND in your git config and if you correctly organise your projects you can use any forge by selecting the correct ssh key and you can even, with a little shell script do it within repo's depending on the remote.
Yes, as mentioned, you would use: sshCommand = -i ~/.ssh/id_client -o IdentityOnly=yes -F /dev/null:
The identityOnly=yes is only there to prevent ssh from looping over all your ssh-keys and potentially using a different ssh key. The -F /dev/null disables using your .ssh/config. You could also use a different SSH config for just the sshCommand, e.g. sshCommand = -F ~/.ssh/config-client and set the correct ssh options in that file.
I know what you are saying, but the problem is that you now need to change all the hostnames when cloning other remotes, upstream, yours and others depending on the size of your (project) team.
Yes, you are going to configure the
GIT_SSH_COMMANDin your git config and if you correctly organise your projects you can use any forge by selecting the correct ssh key and you can even, with a little shell script do it within repo's depending on the remote.Sounds interesting as suggestion, will be best to avoid looping through the existing keys trying to find one.
But if you look closely, you will notice there is a change in the origin I use to clone the repos.
Take for example, to clone a personal repo I'll do the following:
Then upon cloning the repo, I'll use:
Having a close look at the ssh url, we can see a change from
.com=>.meYes, as mentioned, you would use:
sshCommand = -i ~/.ssh/id_client -o IdentityOnly=yes -F /dev/null:I know what you are saying, but the problem is that you now need to change all the hostnames when cloning other remotes, upstream, yours and others depending on the size of your (project) team.
Inputing the ssh identity file can be more effective in terms of performance at the end.
Thanks again for this.