git pull 代碼很慢的問題


辦公環境調整,之前開發機是和自己的電腦放同一網段內的,現在開發機放至到本地其他網段內,造成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 好了

再說一句,運維兄果然很給力.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM