Himanshu
Himanshu

Reputation: 21

Unable to clone gitlab repo behind proxy using ssh

I am having some trouble while cloning the gitlab repo on corporate network when using the url git clone [email protected]:TestProject/Test.git whereas cloning using https just works fine.

Below error is seen while cloning

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

Upvotes: 0

Views: 1288

Answers (1)

Himanshu
Himanshu

Reputation: 21

So it seemed like the port 22 was blocked by the corporate firewall due to which git clone was failing.

Although the other problem i was facing of multiple authentication ( gitlab username & password ) prompt during repo sync got resolved by using

git config --global credential.helper store --file ~/.my-credentials

where ~/.my-credentials contains the gitlab url with username & password

Upvotes: 1

Related Questions