当前位置:   article > 正文

git通过ssh方式连接gitLab_git ssh gitlab

git ssh gitlab

拉取代码时报错如下:

error: RPC failed; curl 56 Malformed encoding found in chunked-encoding
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

原因是拉取的文件太大(2.97G)。

试了网上提供的解决方案大多为修改配置,未能解决。

git config –global http.postBuffer 1524288000

解决措施:git通过ssh方式连接gitLab

1、在git bash或命令行输入

ssh-keygen -t rsa -C "lizhongxun@sunline.cn"

连续回车,生成如下文件

2、打开id_rsa.pub(公钥),复制里面的内容到红框2中,点击add key。

3、测试ssh:ssh -T git@e-git.yfb.sunline.cn

出现 Welcome to ...表示成功。

4、使用ssh从gitlab服务器clone代码

git clone git@e-git.yfb.sunline.cn:clsj/sundataimp/sunimp-docs.git

仍然报错,将域名换成IP

再次clone,成功!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/207708
推荐阅读
相关标签
  

闽ICP备14008679号