当我尝试使用 git 克隆存储库时,SSH 连接会关闭

当我尝试使用 git 克隆存储库时,SSH 连接会关闭

我有一个存储在 Bitbucket 上的私有存储库,我想将其克隆到我的 Debian 服务器上。当我通过 SSH 连接到服务器时,通常我会运行:

git clone https://[email protected]/myusername/myrepo.git

然后回复:

Cloning into 'myrepo'...
Password for 'https://[email protected]':

通常我只需输入密码就可以了,但现在每当我开始输入密码时(甚至没有按回车键),我都会收到以下消息:

Connection to myserverip closed.

我的 SSH 会话已终止。

克隆不受密码保护的存储库仍然有效,这个问题最近才出现。我应该研究什么来解决这个问题?


我还尝试从本地 shell 输入克隆命令:

ssh user@myserverip "git clone https://[email protected]/myusername/myrepo.git"

但我遇到了类似的问题:

fatal: could not read Password for 'https://[email protected]': No such device or address

从 Bitbucket 克隆到我的本地机器(具有相同的存储库)工作正常。

相关内容