Trissa Panda
Trissa Panda

Reputation: 73

how to set up ssh key in windows 7 machine

I am learning git.

My friend set up a git repo in his server and he give me the link for clone it. He also provide me a .ssh folder. and i see there is two file id_rsa.pub and id_rsa.

I already install git so I goto to my user folder and see there is also one .ssh folder with that two file. Now I just copy and paste my friends key pair but when I trying to clone it it ask me the password. What wrong I made ? what is the right process ?

Upvotes: 1

Views: 2333

Answers (1)

VonC
VonC

Reputation: 1323115

The right process would be for you to:

  • not override your public and private key with the ones from your friend
  • not keep the public private key from your friend
  • give your own public key %HOME%\.ssh\id_rsa.pub to your friend for him/her to copy yhat public key in the server ~/.ssh/authorized_keys.

And make sure you start a git session using git-cmd.bat, in order for the environment variable HOME to be properly set (usually to %USERPROFILE%)

Upvotes: 4

Related Questions