我如何配置代理设置以便Eclipse可以下载新的插件?

Rom*_*las 175 eclipse proxy

我正在使用Eclipse 3.7,在Web代理后面的Windows XP环境中.

我想在新解压缩的 Eclipse Indigo(Eclipse Java EE Indigo M4)上安装Groovy插件.我将更新站点添加到列表中.Available Software Site

但Eclipse无法检索此插件的信息,因此无法安装...

如果我将Native配置放入General > Network Connections,但未Auth选择该选项,则在尝试访问更新站点时出现以下错误:

HTTP Proxy Authentication Required: http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/content.xml
HTTP Proxy Authentication Required: http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/content.xml
Proxy Authentication Required
Run Code Online (Sandbox Code Playgroud)

所以现在,我选择manual,我为三个模式(HTTP,HTTPS,SOCKS)定义所有正确的信息:代理,端口,Auth,用户和密码.但是,当我尝试访问更新站点时,Eclipse表明他是Fetching children of Groovy Eclipse,但保持此状态为0%...

奇怪的是,即使我在General > Network Connections配置中输入了错误的密码,我也没有收到任何错误消息.

我的问题:

  • 我的配置有什么问题?
  • 还有另一种定义代理配置的方法吗?
  • 有没有办法获取更多信息,知道Eclipse正在尝试做什么(workspace/.metadata/.log不包含任何有用的信息)?

另一个问题(轻微)是代理设置的修改似乎只在Eclipse重启后才能处理.


ps1:使用我的浏览器,我可以访问更新站点,因此它不会被代理阻止.

ps2:此问题与此插件无关,因为Eclipse对其他插件的行为方式相同.

ps3:这是workspace/.metadata/.log我启动Eclipse并尝试安装插件的内容(所有这些日志都是在启动时编写的,当Eclipse尝试访问更新站点时没有)

!SESSION 2011-05-02 10:38:58.681 -----------------------------------------------
eclipse.buildId=I20101208-1300
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.228
!MESSAGE System property http.proxyHost is not set but should be XXX.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.228
!MESSAGE System property http.proxyPort is not set but should be 8080.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property https.proxyHost is not set but should be XXX.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property https.proxyPort is not set but should be 8080.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property socksProxyHost is not set but should be XXX.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property socksProxyPort is not set but should be 8080.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property https.proxyHost is not set but should be XXX.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property https.proxyPort is not set but should be 8080.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property socksProxyHost is not set but should be XXX.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property socksProxyPort is not set but should be 8080.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property socksProxyHost is not set but should be XXX.

!ENTRY org.eclipse.core.net 1 0 2011-05-02 10:39:02.244
!MESSAGE System property socksProxyPort is not set but should be 8080.

!ENTRY org.eclipse.osgi 2 1 2011-05-02 10:39:02.447
!MESSAGE NLS missing message: TaskJobFactory_Refreshing_repository_configuration in: org.eclipse.mylyn.internal.tasks.ui.messages
Run Code Online (Sandbox Code Playgroud)

编辑

如果我在我的eclipse.ini文件中添加以下行(因为那),它的工作原理如下:

-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=XXX
-Dhttp.proxyUser=XXX
-Dhttp.proxyPassword=XXX
-Dhttp.nonProxyHosts=localhost|127.0.0.1
Run Code Online (Sandbox Code Playgroud)

但为什么?Eclipse 3.7中是否仍存在此问题?

小智 322

我有同样的问题.我将Eclipse 3.7安装到一个新文件夹中,并创建了一个新的工作区.我使用-data参数启动Eclipse以引用新工作区.

当我尝试连接到市场以获取SVN和Maven插件时,我得到了OP中描述的相同问题.

经过几次尝试后,我清除了SOCKS协议的代理设置,并且我能够连接到市场.

因此,我的解决方案是配置HTTP和HTTPS代理的手动设置,清除SOCKS的设置,然后重新启动Eclipse.

  • 很好,这对我公司的防火墙起了作用.谢谢! (24认同)
  • 实际上,即使它看起来像SOCKS值完全是空的,这突然起作用(对于MANUAL配置)我突出显示SOCKS行,单击"清除",然后确定,然后重新启动eclipse.如果这不是一个bug,我不知道是什么. (12认同)
  • 我也有这个问题,并尝试了上述步骤.但它仍然无法解决.我不得不编辑[eclipse安装目录] /configuration/.settings/org.eclipse.core.net.prefs并重置proxyData/SOCKS/hasAuth = false.然后按照此答案中的步骤操作 (3认同)

Myk*_*ych 40

手动+禁用SOCKS对我不起作用(仍试图使用SOCKS和我的公司代理拒绝它),
Native +更改eclipse.ini为我工作

-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient
-Dhttp.proxyHost=myproxy
-Dhttp.proxyPort=8080
-Dhttp.proxyUser=mydomain\myusername
-Dhttp.proxyPassword=mypassword
-Dhttp.nonProxyHosts=localhost|127.0.0.1
Run Code Online (Sandbox Code Playgroud)

这些设置需要重新启动IDE(有时使用-clean -refresh命令行选项).
https://bugs.eclipse.org/bugs/show_bug.cgi?id=281472


Java8,Eclipse Neon3,慢代理服务器:

-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4
-Dhttp.proxyHost=<proxy>
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=<proxy>
-Dhttps.proxyPort=8080
-DsocksProxyHost=
-DsocksProxyPort=
-Dhttp.proxyUser=<user>
-Dhttp.proxyPassword=<pass>
-Dhttp.nonProxyHosts=localhost|127.0.0.1
-Dorg.eclipse.equinox.p2.transport.ecf.retry=5
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.connectTimeout=15000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=1000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts=20
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=1000
-Dorg.eclipse.ecf.provider.filetransfer.browse.connectTimeout=3000
-Dorg.eclipse.ecf.provider.filetransfer.browse.readTimeout=1000
Run Code Online (Sandbox Code Playgroud)

  • 嗨,是否需要"Dorg.eclipse.ecf.provider.filetransfer.excludeContributors"部分? (4认同)
  • 确认氧气.2和3A. (2认同)

Mic*_*ael 13

只是为了将线程添加为可能的解决方案,我在公司防火墙后面的Linux系统上进行开发时遇到了类似的问题.但是,使用Windows XP计算机,Eclipse能够很好地访问不同的更新站点,因为手动和本机网络连接提供程序使用公司代理工作得很好.

经过一段时间的磕磕绊绊之后,我遇到了关于使用NTLMv2和http://cntlm.sourceforge.net/上的实现的讨论.对于任何发布此内容的人,我都非常赞赏,因为它帮助我解决了在Linux上运行的问题.作为旁注,我在Linux和Windows发行版上都使用了Eclipse 3.6.2/Helios.

祝你找到解决方案!


raz*_*one 13

有一个eclipse.ini(sts.ini)参数可以帮助:

-Djava.net.useSystemProxies=true
Run Code Online (Sandbox Code Playgroud)

每次我改变工作环境时,都会在这个微不足道的设置上浪费很多精力......请参阅eclipse bugzilla上的一个相关错误.

  • 以防万一它影响其他任何人,使用Eclipse使用`useSystemProxies = true`会给我带来问题,因为它没有正确检测到env变量`https_proxy`.因此,虽然http页面工作正常,但https页面无法加载.另请注意,设置此设置后,从环境中读取的设置将覆盖Eclipse代理设置. (3认同)

小智 11

终于为我工作了!

在Eclipse,Window> Preferences> General> Network Connections中,
将Active Provider设置为native
添加到eclipse.ini:

-Djava.net.useSystemProxies=true
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=myproxy
-Dhttp.proxyUser=mydomain\myusername
-Dhttp.proxyPassword=mypassword
-Dhttp.nonProxyHosts=localhost|127.0.0.1|192.168.*|10.*
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4
Run Code Online (Sandbox Code Playgroud)


小智 5

我安装了HandyCache,在我的通用代理上安装链接.

在IE中设置代理127.0.0.1.

在Eclipse,Window> Preferences> General> Network Connections中,设置Active Provider = Native.