Cargo started sccache does not use system trusted CAs?
⚓ Rust 📅 2025-12-24 👤 surdeus 👁️ 1I hosted a Minio server with customized CA for https. I have installed the CA to my NixOS. I confirmed it works that by running cUrl fetching Minio console before and after installing the CA.
Now I am trying to have sccache using Minio as backend storage. With these envs, sccache --start-server ran smoothly. sccache -s also reports reasonable data. No errors.
SCCACHE_BUCKET=sccache
SCCACHE_ENDPOINT=minio.magicloud.lan:443
SCCACHE_REGION=auto
SCCACHE_S3_ENABLE_VIRTUAL_HOST_STYLE=false
SCCACHE_S3_SERVER_SIDE_ENCRYPTION=false
SCCACHE_S3_USE_SSL=false
But cargo build in my project failed, with message:
error: process didn't exit successfully: `sccache /home/magicloud/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc -vV` (exit status: 2)
--- stderr
sccache: error: Server startup failed: cache storage failed to read: Unexpected (temporary) at read => send http request
Context:
url: https://minio.magicloud.lan/sccache/.sccache_check
called: http_util::Client::send
service: s3
path: .sccache_check
range: 0-
Source:
error sending request for url (https://minio.magicloud.lan/sccache/.sccache_check): client error (Connect): error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:2124: (unable to get local issuer certificate): error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:2124:
Backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: <unknown>
14: <unknown>
15: __libc_start_call_main
16: __libc_start_main_alias_1
17: <unknown>
Run with SCCACHE_LOG=debug SCCACHE_NO_DAEMON=1 to get more information
Two problems actually. One, cargo is trying to start its own sccache server, regardless the one I started. Two, if I stopped the one I started, I still got this error seems indicating that sccache does not use system trusted CAs.
My .cargo/config.toml is
[build]
target = ["x86_64-unknown-linux-musl"]
rustc-wrapper = "/home/magicloud/.cargo/bin/sccache"
Sccache version is 0.12.0
2 posts - 2 participants
🏷️ Rust_feed