Am Mittwoch, den 16. November schrieb Eduard Bloch:
> * M G Berberich [Tue, Nov 15 2011, 09:34:51AM]:
> > Package: apt-cacher-ng
> > Version: 0.6.8-2+b1
> > Severity: normal
> > 
> > Dear Maintainer,
> 
> Hello user,
> 
> > I have a line
> > 
> >   deb http://localhost:8003/intern/debian wheezy forwiss
> 
> Which is what exactly? An own web server hosting a repository on port
> 8003?

An ssh-tunnel to a webserver hosting a
repository. The local tunnel-endpoint is port 8003.

> 
> > in apt-sources. “aptitude update” does not work on this line if
> > started via sudo, it works if startet from a root-shell.
> > aptitude fails with:
> > 
> >     …
> >     Ign http://localhost wheezy Release.gpg
> >     Ign http://localhost wheezy Release                    
> >     Ign http://localhost wheezy/forwiss amd64 Packages/DiffIndex   
> >     Ign http://localhost wheezy/forwiss TranslationIndex                   
> >     Err http://localhost wheezy/forwiss amd64 Packages                   
> >       403  Prohibited port (configure Remap-...)
> >     …
> > 
> > The error-message seems to originate from apt-cacher-ng.
> 
> And what's the difference between the two shells? I can only guess, and
> my best guess is that the one exports http_proxy variable pointing to
> apt-cacher-ng and the other doesn't (read: you are not using
> apt-cacher-ng there at all).

in the first case aptitude ist startet via

    > sudo aptitude

in the second case aptitude ist startet from a root-shell

    > su
    Password:
    # aptitude

There is no http_proxy environment. Apt-cacher-ng is configured via
the file /etc/apt/apt.conf.d/20aptcacherng containing:

    Acquire::http { Proxy "http://127.0.1.1:3142";; };

as recommended by the webpage showing on http://localhost:3142/

> And so we come to the real issue: the support of alternative ports. At
> the moment this support is limited to the host listed in Remap rules.

But thanks to your hint with environment I found the reason why it
works from root-shell and not via sudo. There is “no_proxy=localhost“
set in the environment, but removed from sudo.

> However, I will consider adding an option to let administrator specify a
> list of allowed ports. The workaround for you in the meantime is using
> the alternative proxy selection method, i.e. do not use $http_proxy in
> environment or apt's global setting, and instead insert the proxy
> host:port into each URL of your hosts file.

What hosts-file? /etc/hosts?

        MfG
        bmg

-- 
„Des is völlig wurscht, was heut beschlos- | M G Berberich
 sen wird: I bin sowieso dagegn!“          | berbe...@fmi.uni-passau.de
(SPD-Stadtrat Kurt Schindler; Regensburg)  | www.fmi.uni-passau.de/~berberic



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to