Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使用ssh在代理后克隆gitlab repo_Git_Ssh_Gitlab - Fatal编程技术网

无法使用ssh在代理后克隆gitlab repo

无法使用ssh在代理后克隆gitlab repo,git,ssh,gitlab,Git,Ssh,Gitlab,在使用url时,在公司网络上克隆gitlab repo时遇到了一些问题 git克隆git@gitlab.com:TestProject/Test.git 而使用https进行克隆就可以了 克隆时出现以下错误 ssh_exchange_标识:远程主机关闭的连接 致命:无法从远程存储库读取 请确保您拥有正确的访问权限 而且存储库存在,因此端口22似乎被公司防火墙阻止,这是git克隆失败的原因 尽管我在repo同步过程中遇到的另一个多重身份验证(gitlab用户名和密码)提示问题通过使用 git co

在使用url时,在公司网络上克隆gitlab repo时遇到了一些问题 git克隆git@gitlab.com:TestProject/Test.git 而使用https进行克隆就可以了

克隆时出现以下错误

ssh_exchange_标识:远程主机关闭的连接 致命:无法从远程存储库读取

请确保您拥有正确的访问权限
而且存储库存在

,因此端口22似乎被公司防火墙阻止,这是git克隆失败的原因

尽管我在repo同步过程中遇到的另一个多重身份验证(gitlab用户名和密码)提示问题通过使用

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

其中~/.my credentials包含带有用户名和密码的gitlab url

这是什么类型的代理?@Kenster:基本上我是在尝试从公司网络访问上述url。如果代理阻止端口22到外部服务器,你可能就倒霉了。为什么不能直接使用https签出?@StephenNewell我通过在gitlab中创建多个repo部署了android source,为了访问它,我使用了repo sync,它会提示多次身份验证(gitlab用户名和密码)。所以为了避免这种情况,我在清单文件中寻找使用ssh而不是https进行克隆