zimbatm / vscode-devcontainer-nix

WIP: VSCode remote container for Nix-based environments
Apache License 2.0
12 stars 2 forks source link

Unable to use cachix in Docker due to cacert issue #1

Open srid opened 3 years ago

srid commented 3 years ago

This happens during image build (in vscode) when I use cachix in the Dockerfile.

[...]
copying path '/nix/store/qlh6hka8wkabbdlzmplw68a4y2sh1mzm-cachix-0.5.1' from 'https://cache.nixos.org'...
building '/nix/store/8p1sqpbadlpkz1a63g6rqmrlq4b98kd1-user-environment.drv'...
created 1006 symlinks in user environment
cachix: ConnectionError (HttpExceptionRequest Request {
  host                 = "cachix.org"
  port                 = 443
  secure               = True
  requestHeaders       = [("Accept","application/json;charset=utf-8,application/json"),("Authorization","<REDACTED>"),("User-Agent","cachix 0.5.1")]
  path                 = "/api/v1/cache/srid"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
 (InternalException (HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa)))))
The command '/bin/sh -c nix-env -iA cachix -f https://cachix.org/api/v1/install   && cachix use srid   && nix-build -j auto' returned a non-zero code: 1

To reproduce:

  1. git clone https://github.com/srid/neuron.git -b codespaces
  2. cd neuron && git checkout fc53a465d33cf211c923eb29c2130a6614c70b50
  3. code .
zimbatm commented 3 years ago

can you check if $SSL_CERT_FILE exists?