1

I'm trying to connect to a remote get repo (clone, push etc') using SSH. I know the ssh -url of the git repo and have generated private and public key.

I put the public key in Git and trying to send the private key as a parameter when i git clone but no matter how i do it the command doesn't work, here's what i try to do:

git clone 'ssh-url-for-my-git-repo' 'destination_folder' -key private_key.ppk

OR

git clone 'ssh-url-for-my-git-repo' 'destination_folder' -i private_key.ppk

I don't understand how i am supposed to pass that key to git - as .ppk file ? as converted .rsa file ? how do i use that .ppk file of the private key ?

All i get in response is 'too many arguments'. I know there's no flag as -k but how else can i pass that key when i try to establish an ssh connection ?

Thanks

Caffeine
  • 113
  • 1
  • 1
  • 7
  • Convert your key to OpenSSH Key then try to connect with it, it should be ".pub" extension – Ahmet Zeybek Apr 11 '18 at 05:56
  • But how do i pass it in the same clone command - all i'll get is 'too many arguments' ? You can't just include it in the same line of the git-clone command – Caffeine Apr 11 '18 at 05:57
  • 1
    Possible duplicate of [Specify private SSH-key to use when executing shell command?](https://stackoverflow.com/questions/4565700/specify-private-ssh-key-to-use-when-executing-shell-command) – phd Apr 11 '18 at 09:28

0 Answers0