حصلت على الحل. أعطاني أحد أفراد مجتمع Eclipse بعض الأفكار.
هذا هو هذا الموضوع: http://www.eclipse.org/forums/index.php/m/1176786/#msg_1176786
كنت بحاجة لتعيين تكوين الوكيل لـ JGIT ، باستخدام ProxySelector
صف دراسي.
ProxySelector.setDefault(new ProxySelector(){
final ProxySelector delegate = ProxySelector.getDefault();
@Override
public List<Proxy> select(URI uri) {
// Filter the URIs to be proxied
if (uri.toString().contains("github") && uri.toString().contains("https")) {
return Arrays.asList(new Proxy(Type.HTTP,
InetSocketAddress.createUnresolved("localhost", 3128)));
}
if (uri.toString().contains("github") & uri.toString().contains("http")) {
return Arrays.asList(new Proxy(Type.HTTP,
InetSocketAddress.createUnresolved("localhost", 3129)));
}
// revert to the default behaviour
return delegate == null ? Arrays.asList(Proxy.NO_PROXY) : delegate.select(uri);
}
@Override
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
if (uri == null || sa == null || ioe == null) {
throw new IllegalArgumentException("Arguments can't be null.");
}
}
});
في حالتي "localhost"/3128
و localhost"/3129
إذا كان عنوان URL/PORT HTTPS و HTTP على التوالي ، أرغب في استخدامه.
المرجع: تكوين الوكيل JGIT في الكود
عملت بشكل جيد.