access a bazaar repository through an ftp proxy

Asked by Timmie

Hello,
I would likt to access my repository that I store on a FTP server from various places.
On the road and at the office where I am behind a corporate firewall.

How to I configure the proxy settings for bazaar in both Windows and Ubuntu?

Thanks in advance,
Timmie

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Timmie
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
John A Meinel (jameinel) said :
#1

generally proxies are configured via an environment variable. Such as "ftp_proxy=XXXX"

I'm not 100% sure if bzr supports ftp proxies, I know we support http proxies.

Revision history for this message
Timmie (timmie) said :
#2

Hello,
I always get thsi error:

bzr: ERROR: Transport error: Error setting up connection: 530 Login authentication failed 530 Login authentication failed

when I use:

before I did:
SET ftp_proxy="proxyadress.de:2961"

bzr get ftp://<email address hidden>/bzr-repo/myprogram

Revision history for this message
John A Meinel (jameinel) said :
#3

Do you need to log into your proxy?

I don't see 'proxy' showing up in 'ftplib', so it is possible that python's ftp support doesn't include proxy support.

Revision history for this message
John A Meinel (jameinel) said :
#4

Sorry, I meant to say if you need to log into your proxy, then you need to use something like:
  ftp_proxy="user:password@host"

At least, that is my understanding of how proxies work.

Revision history for this message
Timmie (timmie) said :
#5

I was using bzr 0.9.

Then it told be to upgrade.

No with

@ECHO OFF
SET ftp_proxy="proxyadress.de:2961"
bzr get ftp://username:<email address hidden>/bzr-repo/myprogram

It works!!!

Many thanks.

Do you know how I make my proxy settings persistent on windows?
Is there a configuration file for this?

Kind regards,
Timmie

P.S.: I know that my question wasn't really a bzr issue. But somehow related ;-)

Revision history for this message
John A Meinel (jameinel) said :
#6

What version of Windows?

I believe on XP, you can right click on My Computer and select Settings.

From there, you can go to the "Advanced" tab, which has an "Environment Variables" button.

You can set a new variable either for just your user, or as a system-wide variable called "ftp_proxy" with the appropriate value.

For Vista, right click on My Computer, and go to Properties. And then there is an "Advanced system settings" link that takes you directly to the same tab as above. You still hit the "Environment Variables..." button, etc.

I believe you can also get there via Control Panel/System .

Revision history for this message
Timmie (timmie) said :
#7

What a coincidence:
I must have found out about that option right after I wrote my last comment.

So I would have posted the same solution here. But you came first.

This is great. Not we have it as a reference for all coders that are used to bash and Linux but sometimes need to work on Windows!

Thanks very much for your help!!!

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

On Unix: set the ftp_proxy

On XP: you can right click on My Computer and select Settings.

From there, you can go to the "Advanced" tab, which has an "Environment Variables" button.

You can set a new variable either for just your user, or as a system-wide variable called "ftp_proxy" with the appropriate value.

For Vista, right click on My Computer, and go to Properties. And then there is an "Advanced system settings" link that takes you directly to the same tab as above. You still hit the "Environment Variables..." button, etc.

I believe you can also get there via Control Panel/System .
FAQ #105: “access a bazaar repository through an ftp proxy”.

Revision history for this message
Timmie (timmie) said :
#9

I still cannot branch stuff from Launchpad.

I do:

set HTTP_PROXY=proxy.example.com:8000

C:\temp>bzr branch http://bazaar.launchpad.net/~ipython-dev/ipython/trunk/files
bzr: ERROR: Invalid url supplied to transport: "proxy.example.com:8000": No host
component

With the Mercurial repositories, I just run:
hg --config http_proxy.host=proxy.example.com:8000 clone http://hg.example.com/repo

and it works.

Revision history for this message
John A Meinel (jameinel) said :
#10

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim wrote:
> Question #33600 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/33600
>
> Status: Solved => Open
>
> Tim is still having a problem:
> I still cannot branch stuff from Launchpad.
>
> I do:
>
> set HTTP_PROXY=proxy.example.com:8000
>
> C:\temp>bzr branch http://bazaar.launchpad.net/~ipython-dev/ipython/trunk/files
> bzr: ERROR: Invalid url supplied to transport: "proxy.example.com:8000": No host
> component
>
> With the Mercurial repositories, I just run:
> hg --config http_proxy.host=proxy.example.com:8000 clone http://hg.example.com/repo
>
> and it works.
>

Using what version of bzr? I know there have been some proxy updates in
the 2.1 series, but I thought that only effected resolving "lp:" urls.

Are you sure the HTTP proxy doesn't need to be a URL? Specifically we
seem to use:

http_proxy=http://username:password@host:port/

Or

set HTTP_PROXY=http://proxy.example.com:8000

to use your example.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktUbqAACgkQJdeBCYSNAAOq1gCfYu8+eRCft5pJZHRwSC1kBBP1
QgIAn1NpFLAOAOfoCPYC1SLkr6L7lsSN
=vO4y
-----END PGP SIGNATURE-----

Revision history for this message
Timmie (timmie) said :
#11

Hello,
the original question was resolved in on 2008-05-20 above.

The question from yesterday is related to proxy support when branching from Launchpad.

This is a separate question. See here:

bzr xmlrpc client doesn't use http proxy, causing network errors trying to resolve lp: urls
https://bugs.launchpad.net/python/+bug/186920

Error while using "bzr branch" through proxy
https://bugs.launchpad.net/bzr/+bug/83954

Revision history for this message
Timmie (timmie) said :
#12

another Bug on this:

no able to branch from launchpad behind proxy (squid)
https://bugs.launchpad.net/bzr/+bug/509543