-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
Invalid peer certificate: UnknownIssuer #1130
Comments
I guess your mirror has a self-signed certificate. Maybe try to add it to global trust store like If running Debian / Ubuntu:
Now, running |
@bigbrozer Your comment saved my life! On my Fedora 40 environment, this resolves the problem. (The path to the CA bundle file is different from Debian/Ubuntu.) SSL_CERT_FILE=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem rye sync |
Anyone running into a similar issue during bootstrapping? There doesn't seem to be a way (either via ❯ SSL_CERT_FILE=<PATH_TO_CERT.PEM> UV_INDEX_URL=<URL_TO_MIRROR> PIP_INDEX_URL=<URL_TO_MIRROR> curl -sSf https://rye.astral.sh/get | bash
This script will automatically download and install rye (latest) for you.
######################################################################## 100.0%
Welcome to Rye!
This installer will install rye to /Users/<USER>/.rye
This path can be changed by exporting the RYE_HOME environment variable.
Details:
Rye Version: 0.36.0
Platform: macos (x86_64)
✔ Continue? · yes
✔ Select the preferred package installer · uv (fast, recommended)
✔ What should running `python` or `python3` do when you are not inside a Rye managed project? · Run the old default Python (provided by your OS, pyenv, etc.)
Installed binary to /Users/<USER>/.rye/shims/rye
Bootstrapping rye internals
Downloading cpython@3.12.3
Checking checksum
Unpacking
Downloaded cpython@3.12.3
error: Failed to download `pip==23.3.2`
Caused by: Request failed after 3 retries
Caused by: error sending request for url (https://files.pythonhosted.org/packages/15/aa/3f4c7bcee2057a76562a5b33ecbd199be08cdb4443a02e26bd2c3cf6fc39/pip-23.3.2-py3-none-any.whl.metadata)
Caused by: client error (Connect)
Caused by: invalid peer certificate: UnknownIssuer
error: Failed to download `tomli==2.0.1`
Caused by: Request failed after 3 retries
Caused by: error sending request for url (https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl.metadata)
Caused by: client error (Connect)
Caused by: invalid peer certificate: UnknownIssuer
Updated self-python installation at /Users/<USER>/.rye/self
All done! I kinda threw the kitchen sink at it with |
Hello @notenti, just quickly looked to your comment but I think you are not passing environment variables to the Rye installer but to curl instead which does nothing... try with: curl -sSf https://rye.astral.sh/get | SSL_CERT_FILE=<PATH_TO_CERT.PEM> UV_INDEX_URL=<URL_TO_MIRROR> PIP_INDEX_URL=<URL_TO_MIRROR> bash Edit: You may need to export them if it does not work as the bash installer will call |
Oh my goodness, you're right. Let me give it a whirl. |
@bigbrozer worked like a charm. And to think I get paid for this... For posterity, what I ended up doing is this: curl -sSf https://rye.astral.sh/get | SSL_CERT_FILE=<PATH_TO_CERT.PEM> UV_INDEX_URL=<URL_TO_MIRROR> bash I left off Thanks for the help! |
@notenti that's cool ! Glad to help 😄 |
@CleanAir777 are you able to test again using |
I will try to test this, yes. Sill, I wonder if it will work because of two things:
|
Looks like we are working in the same company LOL. That's not an issue, the guys behind the project are doing great things. You can use the manual installation to download the Rye binary from Github releases, uncompress the archive and run
We are using a proxy with SSL inspection here. Proxy works well with rye / uv. The only thing was that |
First, I went to the repository proxy that my company uses. Then I checked the certificate and downloaded the .PEM for the whole chain. I set the env var SSL_CERT_FILE via ' |
In case someone is having this same issue on Windows / Powershell:
might help |
I guess, downloading the PEM chain will contain only that certificate and not the whole bunch of public CAs that are used across the Internet. That would explain why pip is working (because you do not specify it so it uses the system one). You should really have a full chain that includes your CAs AND the public ones (Mozilla, etc...). |
For me, this issue was caused by bug of uv, and I found a workaround. Additionally, from uv version 0.3.5, it supports the |
Steps to Reproduce
I have installed rye successfully.
I have done a "rye init ryetest" and "cd ryetest".
All good so far.
I have than added the [[sources]] entry to ~/.rye/config.toml to point to the correct url for our corporate "mirror" of pypi.
When I then run "rye sync" I get error messages:
When I access the url directly, I can reach it without error.
When doing a "pip install hatchling" it does download and install "hatchling"
Expected Result
The environment to successfully make contact with the local repository, and install the environment.
Actual Result
See above.
Version Info
Stacktrace
No response
The text was updated successfully, but these errors were encountered: