【问题标题】:How do I configure the proxy settings so that Eclipse can download new plugins?如何配置代理设置以便 Eclipse 可以下载新插件?
【发布时间】:2011-08-16 23:34:13
【问题描述】:

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

我想在新解压的 Eclipse Indigo(Eclipse Java EE Indigo M4)上安装Groovy plugin。 我将update site 添加到Available Software Site 列表中。

但是Eclipse无法检索到这个插件的信息,所以无法安装...

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

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

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

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

我的问题:

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

另一个问题(不过很小)是代理设置的修改似乎只有在 Eclipse 重新启动后才能处理。


ps1:使用我的浏览器,我可以访问更新站点,所以它没有被代理阻止。

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

ps3: 这是我启动 Eclipse 并尝试安装插件时 workspace/.metadata/.log 的内容(所有这些日志都是在启动期间写入的,当 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

编辑

如果我在我的 eclipse.ini 文件 (because of that) 中添加以下行,它会起作用:

-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

但是为什么呢?这个问题在 Eclipse 3.7 中还存在吗?

【问题讨论】:

  • 我有一个类似的问题:如何在 ubuntu 中从代理服务器(或缓存)安装 eclipse 更新?还是我应该在ubuntu服务器上问这个?谢谢
  • 即使在 Eclipse Neon (2017-05-12) 中也存在该问题! 6年过去了:O
  • @Ram .... 在 Eclipse Oxygen (2017-09-21) 中!!

标签: eclipse proxy


【解决方案1】:

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

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

再试几次后,我清除了 SOCKS 协议的代理设置,我能够连接到市场。

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

【讨论】:

  • 同样,我报告了一个错误,它被忽略了。这家伙基本上说它“对我有用”。在过去的 10 年中,我从未让代理设置按预期工作。我必须找到一些隐藏的配置设置。
  • 确实,尽管 SOCKS 值看起来完全为空,但在(对于手动配置)我突出显示 SOCKS 行后突然起作用,单击“清除”,然后确定,然后重新启动 Eclipse。如果这不是错误,我不知道是什么。
  • 非常感谢。我永远不会想到这可能是一个解决方案。我在公司防火墙内,尝试更新 cleacase 插件一直失败。这似乎解决了问题。
  • 我也遇到了这个问题,并尝试了上述步骤。但它仍然无法解决。我不得不编辑 [eclipse 安装目录]/configuration/.settings/org.eclipse.core.net.prefs 并重置 proxyData/SOCKS/hasAuth=false。然后按照此答案中的步骤进行操作
  • 谢谢!这仅在重新启动我的 Ubuntu 机器后对我有用。我所做的任何设置更改都无法说服它。
【解决方案2】:

手动 + 禁用 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

这些设置需要重新启动 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

【讨论】:

  • 您好,是否需要“Dorg.eclipse.ecf.provider.filetransfer.excludeContributors”部分?
  • httpclient4httpclient有什么区别?
  • 确认氧气。2 和 3A。
  • 它确实适用于 Eclipse Oxygen,只需使用本机网络设置并在 eclipse.ini 中添加这些行
【解决方案3】:

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

-Djava.net.useSystemProxies=true

每次我更改工作环境时,都会在这个琐碎的设置上浪费很多精力......请参阅eclipse bugzilla 上的相关错误之一。

【讨论】:

  • 以防万一它影响到其他人,将useSystemProxies=true 与 Eclipse Oxygen 一起使用会给我带来问题,因为它没有正确检测到环境变量 https_proxy。因此,虽然 http 页面运行良好,但 https 页面不会加载。另请注意,一旦设置此设置,从环境读取的设置将覆盖 Eclipse 代理设置。
【解决方案4】:

终于为我工作了!

在 Eclipse 中,窗口 > 首选项 > 常规 > 网络连接,
将 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

【讨论】:

    【解决方案5】:

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

    经过一段时间的磕磕绊绊,我遇到了关于使用 NTLMv2 的讨论以及在http://cntlm.sourceforge.net/ 找到的实现。无论是谁发布了这篇文章,我都非常感谢它帮助我解决了在 Linux 上运行的问题。附带说明一下,我在 Linux 和 Windows 发行版上都使用 Eclipse 3.6.2 / Helios。

    祝你找到解决方案好运!

    【讨论】:

    • 我已经尝试了所有其他建议,但没有任何帮助。安装 CNTLM 就成功了。我在 Windows 7、JDK 1.7、Eclipse 4.3.2
    • @slu 很高兴听到这对您有用!迄今为止,这仍然对我有用,即使迁移到 JDK 和 Eclipse 的最新版本。
    • 使用 cntlm 作为本地代理也适用于我。我也必须禁用袜子,否则 localhost:port 将无法与 luna eclipse 一起使用。
    【解决方案6】:

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

    在 IE 中设置代理 127.0.0.1。

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

    【讨论】:

      【解决方案7】:

      对我来说,我去 \eclipse\configuration.settings\org.eclipse.core.net.prefs 手动设置属性 systemProxiesEnabled 为 true 并重启 eclipse。

      【讨论】:

        猜你喜欢
        • 2012-01-08
        • 1970-01-01
        • 2021-10-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-11-17
        • 2014-11-10
        • 1970-01-01
        相关资源
        最近更新 更多