rocky-linux / rocky-tools

MIT License
393 stars 137 forks source link

migrate2rocky.sh behind a proxy #202

Open DaOs7 opened 1 year ago

DaOs7 commented 1 year ago

Hi. There are to "curl" commands in the script that doesn't work behind a proxy, to check de repos and to download de "gpg". You need to add manually to curl command the parameter '--proxy "http://proxy:port"' in order to work. Maybe will be useful to and a command parameter to insert the proxy to be able working behind a proxy.

pajamian commented 1 year ago

Try setting the ALL_PROXY environment variable, e.g.

ALL_PROXY=http://proxy:port ./migrate2rocky -r

Peter

tuxmaster5000 commented 1 year ago

I have added this two lines in the scipt at the beginning:

export http_proxy=foo:bar
export https_proxy=foo:bar

will helps. When you use puppet, then you can deliver the file as an template and write:

<%- if @facts['PROXY_FACT'] -%>
export http_proxy=foo:bar
export https_proxy=foo:bar
<%- end -%>
pajamian commented 12 months ago

According to the curl docs setting ALL_PROXY should tell curl to use the corresponding proxy, did you try this? did it not work for you?

DaOs7 commented 11 months ago

I have not been able to test it again. I will do asap. But if this is the way... almost there is one. Thanks.