asdf-community / asdf-community/asdf-python

Ability to Utilize Proxies for Downloading Source

Open
#107 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
729
Forks
65
PR merge metrics
No merged PRs in 30d

Description

### Is your feature request related to a problem? Please describe

When asdf runs curl it doesn't seem to be honoring the ~/.curlrc file. I've got a .curlrc file defined and curl itself works fine but when asdf launches curl this doesn't seem to be honored.

Logs from asdf
```
asdf install python 3.9.2
python-build 3.9.2 /home/xxxx/.asdf/installs/python/3.9.2
Downloading Python-3.9.2.tar.xz...
-> https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tar.xz
error: failed to download Python-3.9.2.tar.xz

BUILD FAILED (CentOS Linux 7 using python-build 2.0.3-2-g84a65357)

Results logged to /tmp/python-build.20210715143150.51079.log

Last 10 log lines:
/tmp/python-build.20210715143150.51079 ~/git_repos/ansible
curl: (7) Failed to connect to 2a04:4e42:2f::223: Network is unreachable
```

Validation that curl works

```
curl -Is https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tar.xz | head -n 1
HTTP/1.0 200 Connection established
```

### Describe the proposed solution

Have curl honor ~/.curlrc

### Describe similar `asdf` features and why they are not sufficient

I've been unable to locate this in the documentation. The server is behind a firewall so I have to use proxies to get to the internet.

### Describe other workarounds you've considered

Manually copying the source but I haven't been able to identify a mechanisim to have ASDF point pyenv to a pre-downloaded tarball.

I also see that the asdf curl request is trying to pull from an IPv6 address while the shell is pulling from an IPv4 address (not clear by shell output). This is because I have IPv4 only in my ~/.curlrc which is below.

```
--proxy http://10.37.26.22:3128
--ipv4
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.