How to set a proxy server for yum repos on target server
simonjcarr opened this issue · 1 comments
When I run k3sup install
it fails with the following error
Rancher K3s Common (latest) 0.0 B/s | 0 B 00:25
Errors during downloading metadata for repository 'rancher-k3s-common-latest':
- Curl error (35): SSL connect error for https://rpm.rancher.io/k3s/latest/common/centos/8/noarch/repodata/repomd.xml [OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to rpm.rancher.io:443 ]
Error: Failed to download metadata for repo 'rancher-k3s-common-latest': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Error: error received processing command: Process exited with status 1
I am behind a corporate proxy. If I go onto the target server and set the proxy server in /etc/yum.repos.d/rancher-k3s-common.repo,
[rancher-k3s-common-latest]
name=Rancher K3s Common (latest)
baseurl=https://rpm.rancher.io/k3s/latest/common/centos/8/noarch
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://rpm.rancher.io/public.key
proxy='http://<username>:<password>@10.180.7.22:3128/'
I am able to run sudo yum install
and the repo is resolved. If I remove the proxy entry it fails with the error above.
Is there anyway to specify a proxy server when running k3sup install? as each time an new install runs, the repo on the target server is overwritten. Also I can't set the proxy globally in yum.conf because we have on premise repos that would not be reachable through a proxy.
Thanks for your interest, but support is for sponsors only, please read and follow the issue template instead of deleting it.