Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Using ProxyCommand on JGit(How can I add a ProxyCommand to use ProxyTunnel for JGit)
Using ProxyCommand on JGit [message #1859357] Fri, 02 June 2023 09:03 Go to next message
oka be is currently offline oka beFriend
Messages: 2
Registered: June 2023
Junior Member
Hi,

I'm trying to use JGit to do SCP Operations through an HTTP-Proxy. I'm already able to do that via console by adding a ProxyCommand :
proxytunnel -p localhost:7084 -d host_ip:22 -v

How can I add this to my JGit Application? The best answer I found so far was to add it to my .ssh/config file like this:
Host host_ip
  HostName host_ip
  ProxyCommand proxytunnel -p localhost:7084 -d host_ip -v


but it seems to be ignored by JGit. Any suggestions?
Re: Using ProxyCommand on JGit [message #1859615 is a reply to message #1859357] Tue, 20 June 2023 10:49 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
JGit doesn't do ProxyCommand. But if you have a proxy running at localhost:7084 that allows HTTP CONNECT, try setting environment variable HTTP_PROXY to http://localhost:7084.
Re: Using ProxyCommand on JGit [message #1861021 is a reply to message #1859615] Thu, 14 September 2023 13:43 Go to previous message
oka be is currently offline oka beFriend
Messages: 2
Registered: June 2023
Junior Member
Hi, Sorry for the late reply, I was busy with lots of other stuff.

First of all, thanks for the help!

Unfortunatly, setting HTTP_PROXY has the same result. When Doing SSH-Operation by console, it works as intended, it goes through the proxy tunnel and creates a log file entry in the access-log of my proxy.
But When I run JGit and do an SCP-Operation, it downloads the file as wanted, but doesn't log anything. So it seems like, JGit ignores both HTTP_PROXY and the settings in .ssh/config
Previous Topic:Always getting 'remote hung up unexpectedly' when cloning eclipse.platform.ui over ssh
Next Topic:Absent and confused Ahead/Behind count
Goto Forum:
  


Current Time: Wed Apr 24 22:07:00 GMT 2024

Powered by FUDForum. Page generated in 0.02150 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top