首页 > 其他 > 详细

git pull 时速度很慢,感觉几分钟不动

时间:2021-01-05 10:38:09      阅读:214      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

 解决办法:

办公环境调整,之前开发机是和自己的电脑放同一网段内的,现在开发机放至到本地其他网段内,造成pull 代码很慢的问题,在网上查了一下

以下是原文,链接为 http://blog.sina.com.cn/s/blog_63eb3eec0101ez6e.html

最近装了ubuntu系统,git pull push 代码的时候非常慢,上网查了一下,发现问题所在,以下是原文

Some of our developers installed Ubuntu 10.04 and they are experiencing slow remote operation specifically git fetch, pull and push. I first suspected an error in the git server setup using indefero but the other users on Ubuntu 9.04 did not have this problem.

Investigating further, I found that using ssh to connect to the git server was also slow which could be the cause of the problem. To find out what happens during ssh connection I did:

ssh -v git@git-server


This revealed that ssh was spending a lot of time on using gssapi-with-mic.
To turn this off, I modified the file /etc/ssh/ssh_config to add

GSSAPIAuthentication no


Sure enough, the git operations improved and it has now stopped becoming a chore to do git fetch, pull and push.

I hope you found the post useful. You can subscribe via email or subscribe via a feed reader to get relevant updates from this blog. Have a nice day.

意思是需要使用ssh来连接git 服务器,
使用命令 ssh -v git@git-server
之后打开

/etc/ssh/ssh_config
找到
 GSSAPIAuthentication no 这句话,将其放开
OK,再试一下,果然快了很多

备注:按上面修改了以后,还是很慢,于是就修改了这个文件里的另一个配置

UseDNS yes修改为

UseDNS no

 

OK 好了

再说一句,运维兄果然很给力.

git pull 时速度很慢,感觉几分钟不动

原文:https://www.cnblogs.com/keketoloveme/p/14233943.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!