0
votes

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

1
What kind of proxy is this?Kenster
@Kenster: basically i am trying to access above url from corporate network.Himanshu
If the proxy blocks port 22 to external servers, you're probably out of luck. Why can't you just use https checkouts?Stephen Newell
@StephenNewell i have deployed android source by creating multiple repos in gitlab ,and for accessing that i am using repo sync, which prompt multiple times authentication(gitlab username & password ). So to avoid this i was looking for cloning using ssh instead of https in my manifest fileHimanshu

1 Answers

1
votes

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