-
Notifications
You must be signed in to change notification settings - Fork 204
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
HTTP status client error (403 Forbidden) for public mirror channel #753
Comments
I think the issue is that the This would need a change in |
that
|
This bz2 file is available, without any authentication: $ wget -c http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/repodata.json.bz2
--2024-02-02 12:16:17-- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/repodata.json.bz2
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.15.130, 2402:f000:1:400::2
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.15.130|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33480152 (32M) [application/octet-stream]
Saving to: ‘repodata.json.bz2’
repodata.json.bz2 62%[======================================> ] 19.84M 1.14MB/s |
This has something to do with reqwest.
The reqwest snippet seem to return a 403 with below content, tried searching for any user-agent header but reqwest doesn't seem to send any
whereas the same call with Python requests module or curl seems to work fine. |
I dont think its a bad idea to add a user-agent to all our requests anyway! Do you know if that fixes the issue @sumanth-manchala ? |
Actually I think we had some similar thing in mamba ... |
I added a fix in #892, I can verify that sending along a user-agent indeed fixes the issue. |
@baszalmstra @wolfv to verify, there wasn't a user-agent sent at all before the change in #892? |
I think that's right. No user agent was set before #892. We'll release pixi this week or next week with this change. |
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.toml:
Issue description
Because of network situation, default "conda-forge" channel is slow for me.
So I tried the near mirrors, like
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
, which is public.But I don't know why
HTTP status client error (403 Forbidden)
occured.I also tried
http
, same error.Expected behavior
I use this mirror for conda and micromamba, they are both ok. I think it should be ok for pixi too.
The text was updated successfully, but these errors were encountered: