Git clone/pull 在“将密钥存储在缓存中?"处不断冻结 [英] Git clone / pull continually freezing at "Store key in cache?"

查看:32
本文介绍了Git clone/pull 在“将密钥存储在缓存中?"处不断冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一个存储库从我的 BitBucket 帐户克隆到我的 Windows 10 笔记本电脑(运行 GitBash).我已经完成了连接所需的所有步骤(设置了我的 SSH 密钥,通过 SSH 成功验证 git@bitbucket.org 等).但是,每当我尝试克隆存储库时,在确认我要缓存 Bitbucket 的密钥后,提示会不断挂断.

I'm attempting to clone a repo from my BitBucket account to my Windows 10 laptop (running GitBash). I've completed all of the steps necessary to connect (set up my SSH key, verified by successfully SSHing git@bitbucket.org, etc). However, whenever I attempt to clone a repo, the prompt continually hangs up after confirming that I want to cache Bitbucket's key.

User@Laptop MINGW64 /C/Repos
$ git clone git@bitbucket.org:mygbid/test.git
Cloning into 'test'...
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.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
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) y

没有文件被克隆,结果是一个空的 repo.尝试从此 repo 启动 git pull origin master 也会要求缓存密钥,然后挂起而没有任何反馈.尽管在我进行 SSH 测试时没有要求缓存密钥,但每次 git 操作在失败之前总是要求提供密钥.

No files are cloned, and the result is an empty repo. Trying to initiate a git pull origin master from this repo also asks to cache the key, then hangs with no feedback. Despite not asking for the key to be cached when I do a test SSH, git operations always ask for the key every time before failing.

没有错误消息可以处理,我真的不知道出了什么问题.我尝试了多个存储库,包括非常小的存储库,但都没有成功.

With no error messages to work with, I'm really at a loss as to what is wrong. I've tried multiple repos, including very small ones, with no success at all.

推荐答案

我在 Windows 10 上克隆存储库时也遇到了这个问题.

I had this problem when cloning a repo on Windows 10 too.

我通过使用 Putty GUI 通过 SSH 连接到相关服务器(在您的情况下:bitbucket.org)解决了这个问题,然后在提示询问您是否要将服务器密钥保存到缓存时单击是".再次运行克隆命令然后对我有用!

I got around it by using the Putty GUI to SSH to the server in question (in your case: bitbucket.org) then clicked 'Yes' when the prompt asks if you want to save the server key to the cache. Running the clone command again then worked for me!

这篇关于Git clone/pull 在“将密钥存储在缓存中?"处不断冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆