解决 bunx 报错 invalid CA cert

用以下脚本导出一份系统的 CA 证书:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$store = Get-ChildItem Cert:\LocalMachine\Root
$out = "cafile.crt"

Remove-Item $out -ErrorAction SilentlyContinue

foreach ($cert in $store) {
$pem = @"
-----BEGIN CERTIFICATE-----
$([System.Convert]::ToBase64String($cert.RawData, 'InsertLineBreaks'))
-----END CERTIFICATE-----

"@
Add-Content -Path $out -Value $pem
}

然后在 $HOME\.bunfig.toml 配置:

1
2
[install]
cafile = "C:/cafile.crt"

解决 bunx 报错 invalid CA cert

https://omn.cc/archives/98.html

作者

空指针

发布于

2026-02-09

更新于

2026-02-09

许可协议

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

评论

You forgot to set the shortname for Disqus. Please set it in _config.yml.
Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×