how to specify proxy for bzr+ssh access?

Asked by anatoly techtonik

How to make Bazaar use proxy when accessing bzr+ssh URLs? Environment variables http_proxy, https_proxy, ftp_proxy have no effect.

Question information

Language:
English Edit question
Status:
Expired
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Wouter van Heyst (larstiq) said :
#1

On Thu, Aug 28, 2008 at 01:10:41PM -0000, techtonik wrote:
> New question #43454 on Bazaar:
> https://answers.launchpad.net/bzr/+question/43454
>
> How to make Bazaar use proxy when accessing bzr+ssh URLs? Environment variables http_proxy, https_proxy, ftp_proxy have no effect.

bzr+ssh uses an underlying ssh implementation. You could use a ssh
tunnel or a jumphost (http://blog.ganneff.de/blog/2007/12/15/using-a-ssh-jumphost.html)
for a similar effect.

Wouter van Heyst

Revision history for this message
anatoly techtonik (techtonik) said :
#2

Do you know any jumphosts or tunnels I can use to connect to launchpad?

Revision history for this message
Wouter van Heyst (larstiq) said :
#3

On Thu, Aug 28, 2008 at 01:28:45PM -0000, techtonik wrote:
> Question #43454 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/43454
>
> Status: Answered => Open
>
> techtonik is still having a problem:
> Do you know any jumphosts or tunnels I can use to connect to launchpad?

I doubt any public ones exist. But maybe we should take a step back and
figure out a different solution.

Am I correct that you are behind a firewall that doesn't allow traffic
on port 22 to launchpad? Or, why do you want to proxy bzr+ssh?

Wouter van Heyst

Revision history for this message
anatoly techtonik (techtonik) said :
#4

I need bzr+ssh, because I can't push my changes using http and https - bzr complains that "transport operation not possible: http does not support mkdir()". Yes, I am behind a proxy/firewall, which blocks port 22.

Revision history for this message
Martin Pool (mbp) said :
#5

So it depends a bit on the details of your local network.

Perhaps you should talk to your admin and ask if they can allow outgoing ssh to Launchpad, or if they have a recommended way of doing outward ssh connections. If you have a socks server or http connect proxy that allows outgoing connections to port 22, you can configure openssh to use them.

Revision history for this message
anatoly techtonik (techtonik) said :
#6

Finally I've connected to LP without specifying any proxies at all. "telnet bazaar.launchpad.net 22" was successful also. Perhaps LP was offline previously or proxy admins decided to change their policy, but it works.

However, I still need to know how can I divert bzr+ssh traffic through a proxy. I setup SOCKS server, but how to make bzr use it?

Connected (version 2.0, client Twisted)
...

Revision history for this message
Martin Pool (mbp) said :
#7

If you can telnet to port 22 then you don't need to use a proxy.

If you want to use a socks server for some other reason, do something like this: install and configure tsocks, then run 'tsocks bzr push .....', or see the tsocks manual for more options.

Revision history for this message
anatoly techtonik (techtonik) said :
#8

Unfortunately, I am on Windows - there is no tsocks.

Revision history for this message
Launchpad Janitor (janitor) said :
#9

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Martin Pool (mbp) said :
#10

You may be able to use an outbound proxy by using Putty and following the instructions here: http://proxy.dcu.ie/docs/putty_socks.html

If you can make outbound port 22 connections I don't see why you would want to use socks though.

Revision history for this message
anatoly techtonik (techtonik) said :
#11

I am not able to use outbound proxy using instructions at http://proxy.dcu.ie/docs/putty_socks.html because it is where my local proxy settings needs to be filled in.

My port 22 is now opened for direct connections, so the issue is not actual for me anymore, but for people who still need to specify a local proxy to access local 22 there is still no answer.

Revision history for this message
Mariano Mara (marplatense) said :
#12

Currently and temporarily I'm facing similar situation. I'm at a client's office with proxy and while waiting in a meeting I fixed a bug and I want to upload my code to LP.
bzr push bzr+ssh://... returns a Connection timed out on port 22... no surprises there and no big deal since I can push my code later in a less restrictive network. However I can connect to my personal server using ssh with corkscrew and it would be useful to have a similar method to make bzr+ssh be aware of this situation.

Mariano.

Revision history for this message
anatoly techtonik (techtonik) said :
#13

This question is marked as solved, but it seems like I need to reopen it once more. Mariano Mara, could you in the meanwhile specify the version of bzr to know that the problem still persist?

So, is it possible to make Bazaar use proxy when accessing bzr+ssh URLs?

Revision history for this message
Mariano Mara (marplatense) said :
#14

Hi, techtonik.

As requested:
mariano@kafka:~$ bzr --version
Bazaar (bzr) 1.11
  Python interpreter: /usr/bin/python 2.5.2
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /home/mariano/.bazaar
  Bazaar log file: /home/mariano/.bzr.log

Revision history for this message
Launchpad Janitor (janitor) said :
#15

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.

Revision history for this message
anatoly techtonik (techtonik) said :
#16

Still no answer. Seems like there is no way and a bug should be filed.

Revision history for this message
Launchpad Janitor (janitor) said :
#17

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Rohit R (rr0hit) said :
#18

You can use corkscrew

sudo apt-get install corkscrew

then edit ~/.ssh/config

add the following line

ProxyCommand /usr/bin/corkscrew PROXY PORT %h %p

Now run bzr
It should now be able to branch and push via ssh

If proxy server does not permit ssh tunnelling you have to contact your Network Admin