alon sirota
alon sirota

Reputation: 57

git fails to clone: The remote end hung up unexpectedly

I'm using bitbucket for my team project. The problem only appeared after I deleted the local repository (because it wouldn't let me commit changes, but that's another story). But when i cloned for the first time, it did work (I used the HTTP URL).

Currently, when I try to clone using the Visual Studio's team explorer GUI (team explorer tab: connect -> Local Git Repositories -> Clone, and entering the HTTP URL of the git repository, the following message appears:

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

The Output window says:

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


If I enter the SSH URL instead (using the same method again) it pops:

Invalid URI: The URI scheme is not valid.


If I use git bash and enter git clone <HTTP URL> it prints:

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


If I use git bash and enter git clone <SSH URL> it prints:

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

Upvotes: 1

Views: 5786

Answers (1)

kaiwei
kaiwei

Reputation: 46

Without more information, it looks like you are not authenticated. follow the instruction on the bitbucket wiki here and see if that solves the problem

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

Be sure to use the correct url for the corresponding access scheme too.

good luck.

Upvotes: 3

Related Questions