asdf-community / asdf-community/asdf-python

Ability to Utilize Proxies for Downloading Source

Aperta
#107 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Shell
Stelle
729
Fork
65
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia dal flusso di asdf install python 3.9.2 e dal passaggio di download di python-build mostrato nei log, concentrandoti su come viene invocato curl. Confronta quell'invocazione con le impostazioni proxy e IPv4 dell'utente in ~/.curlrc; il lavoro è completato quando i download dei sorgenti rispettano tali impostazioni se eseguiti tramite asdf.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.