解决eclipse中egit中的cannot open git-upload-pack问题

 方案一

 

有时候在eclipse上使用插件egit向github或者osc上同步代码时,有时候会发现出现cannot open git-upload-pack这个问题。

 

一般引起这个问题的原因有两个:一、网络问题,网络访问外网总是会出现各种不稳定因素。二、eclipse中egit插件的配置问题。

       第一个问题自己动手解决,就不多说。

今天主要说第二点:配置问题.

打开eclipse中的windows-->Preferences-->Team-->Git-->Configuration-->User Settings.然后点Add Entry新建一个键值对,输入http.sslVerify=false。

如图所示:

image

然后确定  ,就发现git可以正常的pull和push了。

所有的前提是你能用浏览器访问https://github.com/或者https://bitbucket.org/

 

 

方案二

in eclipse, go to Windows->Prefrences->General->Network Connections->SSH

  • Click tab "Key management"
  • Click generate RSA key.
  • Click Apply -copy and paste everything in the box "sha-rsa ..." into gitlab->profilie-add SSH key

attempt clone again via ssh.

 

 方案三

修改

C:\Windows\System32\drivers\etc\hosts

增加 映射地址

比如如下(请根据自己网络情况,自行修改ip和名称):

192.168.1.117 beyond

 

posted @ 2016-03-26 17:29  牧之丨  阅读(294)  评论(0编辑  收藏  举报