Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pixi behind proxy stuck at loading repodata #2757

Open
2 tasks done
ltalirz opened this issue Dec 20, 2024 · 3 comments
Open
2 tasks done

pixi behind proxy stuck at loading repodata #2757

ltalirz opened this issue Dec 20, 2024 · 3 comments

Comments

@ltalirz
Copy link

ltalirz commented Dec 20, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

$ pixi init
✔ Created /path/to/pixi.toml
$ pixi add python
⠦ updating lock-file   [00:00:22] [────────────────────────────────────────]    0/2                                                                                                                                                                 
  ⠓ default:linux-64     [00:00:22] loading repodata                                      

Issue description

Using pixi on a ubuntu 22.04 VM behind an outgoing web proxy (specified via http_proxy and https_proxy variables).
mamba/conda work fine

Expected behavior

pixi recognizes the proxy environment from the environment variables and is able to pull in the repodata

@ruben-arts
Copy link
Contributor

Hey, maybe this comment will help you: #1035 (comment)

@wolfv
Copy link
Member

wolfv commented Dec 23, 2024

I am trying to recreate a similar proxy situation. I have used the following steps so far:

pixi global install mitmproxy

Then we can use mitmproxy to start a local proxy server.

With the webinterface, we can use mitmweb.

I set HTTP_PROXY and HTTPS_PROXY to localhost:8080

export HTTPS_PROXY=http://localhost:8080
export HTTP_PROXY=http://localhost:8080

Clean repodata cache pixi clean cache --repodata

Create an empty new pixi project, run pixi add python.

Now pixi fails with

ERROR error=error sending request for url (https://prefix.dev/conda-forge/osx-arm64/repodata_shards.msgpack.zst)

  × error sending request for url (https://prefix.dev/conda-forge/osx-arm64/repodata_shards.msgpack.zst)
  ├─▶ client error (Connect)
  ╰─▶ invalid peer certificate: UnknownIssuer

But when I add the mitmproxy ssl certificate with the SSL_CERT_FILE value, thinks are working fine:

export SSL_CERT_FILE=~/.mitmproxy/mitmproxy-ca-cert.pem

@ltalirz - maybe you can give us more pointers on your setup, and maybe logs with -vvv?

@wolfv
Copy link
Member

wolfv commented Dec 23, 2024

Just for reference, and because it might be handy for debugging in the future, this is what mitmweb (served on localhost:8081) looks like for me:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants