[Solved] Configure and update repositories via proxy

[Solved] Configure and update repositories via proxy

Postby antonioeme » Nov 13th, '17, 14:23

Hi!

I've installed Mageia 6 on a Virtualbox VM running in Windows 7. I'm using a computer connected to Internet through a corporate proxy. Virtual Machine has network configured as NAT or NAT Network.
Once in Mageia virtual machine I configure the proxy for Firefox preferences and it works, but can't connect for configure and update repositories (via MCC).

Did tried to set proxy values in MCC and KDE/Plasma settings and my related variables has:
Code: Select all
http_proxy=http://user:pass@proxy.example.com:port/
https_proxy=http://user:pass@proxy.example.com:port/


Did read here that there is a way to call urpmi using proxy values:
viewtopic.php?f=25&t=4780&p=33624&hilit=proxy#p33396
Code: Select all
urpmi --proxy YOURPROXYHERE:PORT --proxy-user=ask anypackagetoinstall


But first I'll need to configure repositories itself, that you made in MCC to choose media from Mirrorlist.

Another option can be if I can to say my company support which IP and which port need to connect and try to redirect to there, but seems as using -proxy options can be enough.

Can you help me?
Last edited by antonioeme on Nov 14th, '17, 16:42, edited 1 time in total.
antonioeme
 
Posts: 3
Joined: Nov 13th, '17, 14:07

Re: Configure and update repositories via proxy

Postby wintpe » Nov 13th, '17, 16:04

I think mageia still tries to use rsysnc by default, and most corporate proxies will block that, i have the same issue when i join the
vendor wifi at work.
make sure taht your package repo is set to use http.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1177
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Configure and update repositories via proxy

Postby doktor5000 » Nov 13th, '17, 20:00

antonioeme wrote:But first I'll need to configure repositories itself, that you made in MCC to choose media from Mirrorlist.

Another option can be if I can to say my company support which IP and which port need to connect and try to redirect to there, but seems as using -proxy options can be enough.

Well, it would probably be helpful if you try to configure the repos and see what happens, it's not clear to me how we should help in particular at this point.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14541
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Configure and update repositories via proxy

Postby wintpe » Nov 14th, '17, 11:49

if he setup the repos at home, where rsync is allowed, and then went to work and tried to use update, that might just hang and lead him down the rabbit hole of a voyage of exploration and discovery.
rather than just setup the repos to work at work, rather than at home.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1177
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Configure and update repositories via proxy

Postby antonioeme » Nov 14th, '17, 14:05

Hi!

thanks for your comments!

Well, the main questions was that I need to manage urpmi using a proxy, but it's the first time I have to deal with this so I'm little confused.

I was trying to add media and update via MCC graphic interface but it can't connect to Internet because the proxy.
Then my second option was to invoke urpmi from command line with -proxy options.

Did read and learn a little more about how to add media from CLI, I found https://wiki.mageia.org/en/URPMI it and it worked.

Code: Select all
urpmi.addmedia --proxy YOURPROXYHERE:PORT --proxy-user=ask --distrib --mirrorlist '$MIRRORLIST'
Por favor, ingrese sus credenciales para acceder al proxy
Nombre de usuario:xxxxxxx
Contraseña:
añadiendo soporte «Core Release2»
añadiendo soporte «Core Release Debug» (ignorado por defecto)
añadiendo soporte «Core Updates»
añadiendo soporte «Core Updates Debug» (ignorado por defecto)
añadiendo soporte «Core Updates Testing» (ignorado por defecto)
añadiendo soporte «Core Updates Testing Debug» (ignorado por defecto)
añadiendo soporte «Core Backports» (ignorado por defecto)
añadiendo soporte «Core Backports Debug» (ignorado por defecto)
añadiendo soporte «Core Backports Testing» (ignorado por defecto)
añadiendo soporte «Core Backports Testing Debug» (ignorado por defecto)
añadiendo soporte «Nonfree Release2»
añadiendo soporte «Nonfree Release Debug» (ignorado por defecto)
añadiendo soporte «Nonfree Updates»
añadiendo soporte «Nonfree Updates Debug» (ignorado por defecto)
añadiendo soporte «Nonfree Updates Testing» (ignorado por defecto)
añadiendo soporte «Nonfree Updates Testing Debug» (ignorado por defecto)
añadiendo soporte «Nonfree Backports» (ignorado por defecto)
añadiendo soporte «Nonfree Backports Debug» (ignorado por defecto)
añadiendo soporte «Nonfree Backports Testing» (ignorado por defecto)
añadiendo soporte «Nonfree Backports Testing Debug» (ignorado por defecto)
añadiendo soporte «Tainted Release» (ignorado por defecto)
añadiendo soporte «Tainted Release Debug» (ignorado por defecto)
añadiendo soporte «Tainted Updates» (ignorado por defecto)
añadiendo soporte «Tainted Updates Debug» (ignorado por defecto)
añadiendo soporte «Tainted Updates Testing» (ignorado por defecto)
añadiendo soporte «Tainted Updates Testing Debug» (ignorado por defecto)
añadiendo soporte «Tainted Backports» (ignorado por defecto)
añadiendo soporte «Tainted Backports Debug» (ignorado por defecto)
añadiendo soporte «Tainted Backports Testing» (ignorado por defecto)
añadiendo soporte «Tainted Backports Testing Debug» (ignorado por defecto)
añadiendo soporte «Core 32bit Release»
añadiendo soporte «Core 32bit Updates»
añadiendo soporte «Core 32bit Updates Testing» (ignorado por defecto)
añadiendo soporte «Core 32bit Backports» (ignorado por defecto)
añadiendo soporte «Core 32bit Backports Testing» (ignorado por defecto)
añadiendo soporte «Nonfree 32bit Release»
añadiendo soporte «Nonfree 32bit Updates»
añadiendo soporte «Nonfree 32bit Updates Testing» (ignorado por defecto)
añadiendo soporte «Nonfree 32bit Backports» (ignorado por defecto)
añadiendo soporte «Nonfree 32bit Backports Testing» (ignorado por defecto)
añadiendo soporte «Tainted 32bit Release» (ignorado por defecto)
añadiendo soporte «Tainted 32bit Updates» (ignorado por defecto)
añadiendo soporte «Tainted 32bit Updates Testing» (ignorado por defecto)
añadiendo soporte «Tainted 32bit Backports» (ignorado por defecto)
añadiendo soporte «Tainted 32bit Backports Testing» (ignorado por defecto)
    $MIRRORLIST: media/core/release/media_info/20170714-192548-synthesis.hdlist.cz
    $MIRRORLIST: media/core/updates/media_info/20171110-191538-synthesis.hdlist.cz                                           
    $MIRRORLIST: media/nonfree/release/media_info/20170714-184104-synthesis.hdlist.cz                                       
    $MIRRORLIST: media/nonfree/updates/media_info/20171110-191138-synthesis.hdlist.cz                                       
    $MIRRORLIST: media/../../i586/media/core/release/media_info/20170714-192023-synthesis.hdlist.cz                         
    $MIRRORLIST: media/../../i586/media/core/updates/media_info/20171110-191359-synthesis.hdlist.cz                         
    $MIRRORLIST: media/../../i586/media/nonfree/release/media_info/20170714-184101-synthesis.hdlist.cz                       
    $MIRRORLIST: media/../../i586/media/nonfree/updates/media_info/20171110-191137-synthesis.hdlist.cz
   


After that it tried to do some urpmi.update but for that without using proxy:

Code: Select all
# ps -aux | grep urpmi
factura   9848  0.0  0.0  15940  2528 ?        SN   11:39   0:00 /bin/sh /bin/urpmi.update --update
root      9849  0.0  0.3 156660 29076 ?        SN   11:39   0:00 /usr/bin/perl /usr/libexec/urpmi.update --update
root     10886  0.0  0.2  77564 16492 ?        SN   11:43   0:00 /usr/bin/aria2c --auto-file-renaming=false --ftp-pasv --summary-interval=1 --follow-metalink=mem --metalink-enable-unique-protocol=true --metalink-preferred-protocol=http --max-tries=5 --lowest-speed-limit=20K --timeout 3 --split=3 --uri-selector=adaptive --server-stat-if=/root/.aria2-adaptive-stats --server-stat-of=/root/.aria2-adaptive-stats --max-file-not-found=9 --connect-timeout=6 -Z -j1 --allow-overwrite=true /var/cache/urpmi/.metalink


And not sure if it worked because I first thought that not, but later I'd tried to do manually and the answer was that all was up to date ("está al día"):

Code: Select all
[root@localhost factura]# urpmi.update --proxy YOURPROXYHERE:PORT --proxy-user=ask -a
Por favor, ingrese sus credenciales para acceder al proxy
Nombre de usuario:xxxxxxx
Contraseña:
el soporte «Core Release2» está al día
el soporte «Core Updates» está al día
el soporte «Nonfree Release2» está al día
el soporte «Nonfree Updates» está al día
    $MIRRORLIST: media/tainted/release/media_info/20170714-184134-synthesis.hdlist.cz
el soporte «Core 32bit Release» está al día                                                                                                                               
el soporte «Core 32bit Updates» está al día
el soporte «Nonfree 32bit Release» está al día
el soporte «Nonfree 32bit Updates» está al día


Anyway I've continued with updates...

Code: Select all
# urpmi --proxy YOURPROXYHERE:PORT --proxy-user=ask --auto-update
(stripped)


So, my doubts now are:

1.- Can I say in any way to urpmi to work always with the proxy. Trying to avoid to launch manually and to ensure it works for automatic updates?
Even if there is the possibility that use the GUI at MCC?

2.- How can I add tainted media by CLI? Did read here
https://wiki.mageia.org/en/URPMI
but can't understand. Did try with "urpmi.addmedia tainted" (with proxy settings) but it ask me for an URL.

Thanks!
antonioeme
 
Posts: 3
Joined: Nov 13th, '17, 14:07

Re: Configure and update repositories via proxy

Postby wintpe » Nov 14th, '17, 15:19

once you have added the media with the proxy, just go into manage repos in mcc and select the tainted repos.

all of those listed will have been added but not automatically selected with proxy

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1177
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Configure and update repositories via proxy

Postby antonioeme » Nov 14th, '17, 16:41

Well, just see now that there is a Proxy option in "Configure media sources..." in MCC.
Problem solved, thank you!

Will edit topic subject.
antonioeme
 
Posts: 3
Joined: Nov 13th, '17, 14:07


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest