git - git无法克隆:远端意外挂断

标签 git bash ssh bitbucket

我正在将bitbucket用于我的团队项目。
该问题仅在删除本地存储库后出现(因为它不允许我进行更改,但这是另一回事了)。
但是,当我第一次克隆时,它确实起作用了(我使用了HTTP URL)。

当前,当我尝试使用Visual Studio的团队资源管理器进行克隆(“团队资源管理器”选项卡:connect-> Local Git Repositories-> Clone,并输入git存储库的HTTP URL时,会出现以下消息:

Failed to clone the remote repository. See the Output window for more details.



输出窗口显示:

The underlying connection was closed: The connection was closed unexpectedly.



如果我改为输入SSH URL(再次使用相同的方法),则会弹出:

Invalid URI: The URI scheme is not valid.



如果我使用git bash并输入git clone <HTTP URL>,则会打印:

error: RPC failed; curl 52 Empty reply from server
fatal: The remote end hung up unexpectedly



如果我使用git bash并输入git clone <SSH URL>,则会打印:

Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

最佳答案

没有更多信息,您似乎没有通过身份验证。
按照此处的bitbucket Wiki上的说明进行操作,看看是否可以解决问题

https://confluence.atlassian.com/bbkb/permission-denied-publickey-302811860.html

确保也为相应的访问方案使用正确的URL。

祝好运。

关于git - git无法克隆:远端意外挂断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37688618/

相关文章:

git - 无法通过 ssh 连接到 BitBucket

bash - 过滤文本文件以根据第 3 列中的值获取唯一条目

python - 使用 Python 通过 SSH 下载文件

ssh - 具有工作 key 的普通 gitlab 用户无法使用 PubkeyAuthentication 登录到 bash shell 提示符

ssh - Gitlab 权限被拒绝(公钥

git - 提交中作者的 git 电子邮件是否可公开阅读?

git - 使用 VisualSVN 服务器 + Git 客户端(使用 git svn)是托管存储库的好解决方案吗?

bash - Ansi 扩展颜色索引中颜色的 RGB 值 (17-255)

bash - 使用包含引号的字符串作为 bash 中命令的参数,无需额外转义

git - SCM 同步不工作