Can’t clone from Bitbucket – Get stuck at “Cloning into…”

git

Maybe you can help me out.
I have a server which I'm accessing thru a SSH tunnel. On this server, I want to clone a git repo from bitbucket, but bitbucket uses Port 22 as well, I assume. So how can I clone the repo to my server using another port?

fyi
I came with this solution since I'm struggling with a weird error. When I try to clone a repo on the server, the program gets stuck at "Cloning into repository….".
After some googling, I found out that the connection to the repo server is "broken". So this is my guess why – I'm connecting to it using SSH.

Thx

UPDATE This is the console output

root@245:/path/to/dev# git clone git@bitbucket.org:123456789/repo.git
Cloning into repo...

and thats it. It gets stuck after "Cloning into dev"…

Best Answer

Run ssh -vv git@bitbucket.org to get more information. In my case the ssh client was trying to connect to bitbucket's IPv6 address but obviously the world is not yet ready.

I had to put this into "Host *" section of /etc/ssh/ssh_config to disable ssh connection over IPv6:

AddressFamily inet
Related Question