Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unable to clone Git Repository

I am trying to connect to gerrit hosted on my VPS. I am using Git Bash for windows. I have already added keys on gerrit server and i have added my public key to authorized_keys as well when i run ssh -p 29418 <username>@<gerrit-server> i will see below welcome message

  ****    Welcome to Gerrit Code Review    ****

  Hi Full Name, you have successfully connected over SSH.

  Unfortunately, interactive shells are disabled.
  To clone a hosted Git repository, use:

  git clone ssh://username@<gerrit-server>:29418/REPOSITORY_NAME.git

but when i clone the repository by running following command

git clone ssh://<username>@<gerrit-server>:29418/project-name.git

i see the following error in my Git Bash terminal

Cloning into 'project-name'...
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I am not able to understand what's going on and how to successfully clone my projects in my machine. Can anyone please help me in this matter?