unable to clone git repository on laptop, however, cloned successfully on dev machine

StackOverflow https://stackoverflow.com/questions/19542246

  •  01-07-2022
  •  | 
  •  

I have successfully installed git on a windows server 2008 machine and set up ssh.

I have successfully cloned a repository on my developer machine (windows 7), but when I tried to clone it on my laptop (windows 7), it is giving me the error:

unable to open connection. Host does not exist

I can connect to it with putty successfully, and also set the environment variable. I cannot identify what I am missing. Please help. Thanks in advance.

有帮助吗?

解决方案

Actually when I tried to clone it was also giving the error in alert box that

The server's host key is not cached in the registry

with option yes or no then I selected Yes then it gave me the error

unable to open connection. Host does not exist  

So the solution is saving the host key in registry

Open up cmd and go to path of plink (mine was C:\Program Files (x86)\GitExtensions\PuTTY) and type plink user@whateveryourserver.com

This will prompt you to save the host key in registry , and enter yes, then try your git command again, and it should be working.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top