办公环境调整,之前开发机是和自己的电脑放同一网段内的,现在开发机放至到本地其他网段内,造成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 代码很慢的问题的更多相关文章

  1. eclipse git pull 代码 failed 并且报DIRTY_WORKTREE.classpath

    用eclipse git pull代码的时候出现如题错误. 解决办法就是reset reset命令有3种方式: 1.git reset –mixed:此为默认方式,不带任何参数的git reset,即 ...

  2. git pull代码冲突。怪异问题,了解一下

    当远程仓库代码与本地代码产生冲突,无法 pull,且决定放弃本地代码的时候. 或者, 碰见我这种不知道什么问题的情况, pull 成功了,但是远程仓库代码和本地代码竟然也不一样. 天呐,网管常规操作, ...

  3. git clone 和 git pull 代码无响应

    记录一下今天 git 拉代码遇到的一些异常情况: 无论是项目目录下 git pull 还是直接 git clone 都不能正常拉代码: 异常情况1 ssh: connect to host gitee ...

  4. git merge git pull时候遇到冲突解决办法git stash

    在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten b ...

  5. 使用git pull文件时和本地文件冲突怎么办?

    同事在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten ...

  6. git pull和本地文件冲突

    在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten b ...

  7. 使用git pull文件时和本地文件冲突怎么办

    在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息:error: Your local changes to 'c/environ.c' would be overwritten by ...

  8. (转)使用git stash解决git pull时的冲突

    在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten b ...

  9. git pull文件时和本地文件冲突的问题

    在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten b ...

随机推荐

  1. 浅谈C++ 异常处理的语义和性能

    异常处理是个十分深奥的主题,这里只是浅论其对C++性能的影响. 在VC++中,有多个异常处理模式,三个最重要: No exception handling (无异常处理) C++ only (C++语 ...

  2. C++普通函数与模板函数以及特化函数重载的优先级问题

    在面对C++模板的时候,需要十分注意,因为模板的复杂性有很多情况,所以最好学习模板的方法我个人认为就是用到就去学,用不到就尽量别去看各种奇门怪技,因为你就算看了,好不容易搞懂模板的实现内部了,包括元编 ...

  3. (转)你知道Android也有安全模式吗?(地球人都知道了吧)

    使用PC时,我们习惯在安全模式下解决驱动的各种兼容性问题.而你是否又知道,Android手机同样存在安全模式,帮你解决APP的各种冲突问题. 很多Android手机用户都遇到过下面这种极端情况:因为第 ...

  4. js学习笔记之:时间(二)

    今天来了解一下js中定时器的两种用法.js中包括2种定时器,分别是:           间隔型定时器:setInterval(开)    clearInterval (关)            延 ...

  5. 用zepto找到当前被选中的option

    $("#dealer").find("option").not(function(){ return !this.selected }).text(); 神奇的 ...

  6. CSS 字体描边

    -webkit-text-stroke: 2px #; text-stroke: 2px #; -o-text-stroke: 2px #;

  7. Delphi笔记(GL_Scene四轴飞行器模型)

    有了前的一篇做铺垫,已经简单的说了GL_Scene的下载安装和一个简单的实例制作.现在就要开始制作一个3D的模型了,具体的步骤就不再这里多说了,直接上图和代码吧! [第一版]先看一下最开始的版本吧,比 ...

  8. RAID磁盘阵列0、1、5、10

    raid0:(又称为Stripe或Striping--分条) (一句话:raid0 用多个磁盘串联起来成一个大磁盘,容量为几个的总和.优点:容量大,速度快.缺点:数据不安全) 即Data Stripp ...

  9. How to create Managed Metadata Column

    This article introduce how to create/use managed metadata column from List. First, we need to config ...

  10. socket函数

    为了执行网络IO,一个进程必须做的第一件事就是调用socket函数,指定期望的通信协议类型 int socket(int family,int type,int protocol); 其中,famil ...