🙆♀️
セキュリティ装置がいる環境で開発ツールが壊れる問題集(Node / Rust)
Claude Code(Node)
Claude Code が以下のエラーで起動できなかったので対応
> このレポジトリがなにか教えて
⎿ API Error (Connection error.) · Retrying in 1 seconds… (attempt 1/10)
⎿ TypeError (fetch failed)
⎿ API Error (Connection error.) · Retrying in 1 seconds… (attempt 2/10)
⎿ TypeError (fetch failed)
⎿ API Error (Connection error.) · Retrying in 2 seconds… (attempt 3/10)
⎿ TypeError (fetch failed)
⎿ API Error (Connection error.) · Retrying in 4 seconds… (attempt 4/10)
⎿ TypeError (fetch failed)
⎿ API Error (Connection error.) · Retrying in 8 seconds… (attempt 5/10)
⎿ TypeError (fetch failed)
⎿ API Error (Connection error.) · Retrying in 17 seconds… (attempt 6/10)
⎿ TypeError (fetch failed)
この記事を参考にした。
Node.jsで、自己署名証明書を設定する方法
証明書は/usr/local/share/ca-certificates/self-company-ca.pem
に配置済みなので以下のようにする。
-
vi ~/.bashrc
で.bashrc
を開く。 - 末尾に、
export NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/self-company-ca.pem
を追加 -
source ~/.bashrc
で反映させる。
rust
windows上の話。
cargo build
が以下のエラーで通らない。
cargo build
Blocking waiting for file lock on package cache
Updating crates.io index
warning: spurious network error (3 tries remaining): [35] SSL connect error (schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012))
warning: spurious network error (2 tries remaining): [35] SSL connect error (schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012))
warning: spurious network error (1 tries remaining): [35] SSL connect error (schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012))
error: failed to get `aes` as a dependency of package `hello-rs v0.1.0 (E:\develop\hello-rs)`
Caused by:
download of config.json failed
Caused by:
failed to download from `https://index.crates.io/config.json`
Caused by:
[35] SSL connect error (schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012))
この記事を参考にした。
Rustのクレートが職場のセキュリティのせいでダウンロードができない人はこれを見ろ!!
-
%USERPROFILE%\.cargo\
でconfig.toml
を開く。なければ作成する。 - 以下を追加
[http] check-revoke = false
Discussion