I have the following and i need to clone the repository in either windows terminal command prompt or linux.
Always coming late to answer anything, it may be possible that you have more than one ssh keys and if not specified git will try to use id_rsa
but if you need a different one you could use
git clone git@provider.com:userName/projectName.git --config core.sshCommand="ssh -i ~/location/to/private_ssh_key"
This way it will apply this config and use a key different than id_rsa
before actually fetching any data from the git repository.
subsequent fetch
or push
will use the specified key to authenticate for the cloned repository.
Hope this is helpful to anyone.