I have a remote repo which I want to clone. I've set up pageant.exe and added private key. Also added GIT_SSH variable which points to plink.exe. And after clone command I get such output
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
...
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n)
When typing y
or n
nothing happens, console just hangs and I have to terminate the command with Ctrl+C
Why this happens and how to fix this?
Cloning a repository pulls down a full copy of all the repository data that GitHub.com has at that point in time, including all versions of every file and folder for the project. You can push your changes to the remote repository on GitHub.com, or pull other people's changes from GitHub.com.
This can be annoying as running tests blocks you from picking up the next story -- but it doesn't have to be that way! Simply clone your project's repo twice (or even more often). When your work on a feature branch is done, simply push that branch and check it out on your 2nd copy to run tests there.
No, cloning cannot be resumed, if it's interrupted you'd need to start over. If you suspect that there's a good chance that your clone may be interrupted, look for a git bundle that you can download using a protocol that can be resumed.
After several hours of investigation I finally found a solution.
The putty has to know smth about the host you're connecting to, namely host must be known_host
to putty. Putty stores information about know_hosts
under
HKEY_CURRENT_USER\SoftWare\SimonTatham\PuTTY\SshHostKeys
registry key. To force putty to add information about that host to registry key we can by accessing via putty.exe using your private key. On first access putty will ask you to add that host to known_hosts
. After that git clone command finishes successfully.
Maybe this will be helpful for somebody, because it's not obvious from the first glance
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With