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 好了
再说一句,运维兄果然很给力.
git pull 代码很慢的问题的更多相关文章
- eclipse git pull 代码 failed 并且报DIRTY_WORKTREE.classpath
用eclipse git pull代码的时候出现如题错误. 解决办法就是reset reset命令有3种方式: 1.git reset –mixed:此为默认方式,不带任何参数的git reset,即 ...
- git pull代码冲突。怪异问题,了解一下
当远程仓库代码与本地代码产生冲突,无法 pull,且决定放弃本地代码的时候. 或者, 碰见我这种不知道什么问题的情况, pull 成功了,但是远程仓库代码和本地代码竟然也不一样. 天呐,网管常规操作, ...
- git clone 和 git pull 代码无响应
记录一下今天 git 拉代码遇到的一些异常情况: 无论是项目目录下 git pull 还是直接 git clone 都不能正常拉代码: 异常情况1 ssh: connect to host gitee ...
- git merge git pull时候遇到冲突解决办法git stash
在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten b ...
- 使用git pull文件时和本地文件冲突怎么办?
同事在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten ...
- git pull和本地文件冲突
在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten b ...
- 使用git pull文件时和本地文件冲突怎么办
在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息:error: Your local changes to 'c/environ.c' would be overwritten by ...
- (转)使用git stash解决git pull时的冲突
在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten b ...
- git pull文件时和本地文件冲突的问题
在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息: error: Your local changes to 'c/environ.c' would be overwritten b ...
随机推荐
- WBS说明
work breakdown structure(WBS) 工作分解结构 (英语:Work Breakdown Structure, WBS)是一个详尽的,层次的(从全面到细节)的树形结构,由可交付成 ...
- 二十分钟弄懂C++11 的 rvalue reference (C++ 性能剖析 (5))
C++ 11加了许多新的功能.其中对C++性能和我们设计class的constructor或assignment可能产生重大影响的非rvalue reference莫属!我看了不少资料,能说清它的不多 ...
- openstack VM可以ping外部网络,但是外部网络ping不通VM
经过无数次的尝试,终于搭建好了完整的Openstack,本来VM可以获取到IP地址,但是等到我大功告成的时候,突然发现外部网络却不能ping进VM,我可是整整折腾了我几个通宵,这是哭啊.然而,皇天不负 ...
- C++在使用Qt中SLOT宏需要注意的一个小细节
大家都知道C++虚函数的机制,对于基类定义为虚函数的地方,子类如果覆写,在基类指针或者引用来指向子类的时候会实现动态绑定. 但如果指针去调用非虚函数,这个时候会调用C++的静态绑定,去判断当前的指针是 ...
- Java学习----不变的常量
byte: -128~+127 short int:129 long float:1.5f (1.5被系统默认为double) double:4.5d char:'s' '1' boolean:t ...
- 说一说&&符
今天添加检测代码,还得添加好几套,好蛋疼. 为了省点事,全写在HTML的行间onclick里,为此专门琢磨了一下&&的用法. 一般用&&(除了逻辑判断里),是为了简写i ...
- socket本地模拟UDP 服务器+客户端(三)
UDP: TCP是建立可靠连接,并且通信双方都可以以流的形式发送数据.相对TCP,UDP则是面向无连接的协议. 使用UDP协议时,不需要建立连接,只需要知道对方的IP地址和端口号,就可以直接发数据包. ...
- Dapper快速学习
Dapper快速学习 我们都知道ORM全称叫做Object Relationship Mapper,也就是可以用object来map我们的db,而且市面上的orm框架有很多,其中有一个框架 叫做dap ...
- linux 路由表设置 之 route 指令详解
使用下面的 route 命令可以查看 Linux 内核路由表. # route Destination Gateway Genmask Flags Metric Ref ...
- laravel框架——上传、下载文件
文件上传 在config文件夹下新建一个 项目名.php return [ 'title' => 'My Test', 'posts_per_page' => 5, 'uploads' = ...