Mailinglist Archive: opensuse-buildservice (216 mails)

< Previous Next >
Re: [opensuse-buildservice] How to access OBS from behind a proxy (used to work)?
  • From: "Dominique Leuenberger" <Dominique.Leuenberger@xxxxxxxxxxxxx>
  • Date: Thu, 18 Mar 2010 09:52:44 +0100
  • Message-id: <4BA1F7EC0200002900095D85@xxxxxxxxxxxxxxxxxxx>
On 3/18/2010 at 9:42, Richard Bos <rbos@xxxxxxxxxxxx> wrote:
Hi,

since a few weeks (2-3 weeks), I'm not able to access
the OBS from behind a proxy. This used to work with the
setup described in this email:
http://lists.opensuse.org/opensuse-buildservice/2007-04/msg00016.html

I had a look at theOBS CLI migration page:
http://en.opensuse.org/Build_Service/CLI#Configuration_migration
But from that I did not get the hint that makes it work for me.
(it looks like that it is not possible to specify the port number)

The result is:
home:rbos> osc ls openSUSE_11.2 i586 home:rbos
SSL Error: unexpected eof

At the moment my .oscrc contains:
home:rbos> cat ~/.oscrc
[DEFAULT]

[general]
apiurl=https://api.opensuse.org:9999

[https://api.opensuse.org:9999]
user=<login>
passx=<password>

What's needed to access OBS again from behind proxy??

Those entire workaround things are no longer needed if you run a recent enough
python and urllib2 (python 2.6 is what is checked in osc). At very
first I had to change my conf.py (as python got updated before osc new about
it)... check conf.py in the osc installation folder (you can easily find
it using rpm -ql osc) and search for "if 'https_proxy' in os.environ:" . In
older versions of osc this was unconditionally done... latest ones do it
only with python < 2.6. If it's unconditional in your version, you should
either:
a) upgrade osc. You will love it
b) comment out the deletion of the environment variable.

In both cases (again: with python 2.6 running), you can do:

export http_proxy=http://ip.proxy.com:3128
export https_proxy=$http_proxy

I use this almost daily for a few weeks without issues. (I'm still missing
support for pac files... but that has to be hacked in urllib2, which has a
very bad structure to put anything alike in...)

Dominique
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References