Subject: bug#37347: 'guix environment' fails after trying to follow the steps from "Running Guix Before It Is Installed" page

From: Jan <[email-masked]>
Date: Wed, 11 Sep 2019 22:53:18 +0200

> Do not run ./configure alone, always specify --localstatedir=/var
> unless you plan to run the daemon from the repo too (then it's fine
> without the option, but you won't be able to pull or you'll get into
> trouble iiuc).

Thank you all for advice, after running 
./configure --localstatedir=/var the file has been generated. Then to
be able to run Guix, I had to do "make check". Now I have Guix available
and I would like to update a package, like showed in the manual or the
tutorial, but running for example "./pre-inst-env guix refresh opendht"
throws the following error:

Backtrace:
          18 (apply-smob/1 #<catch-closure 1085500>)
In ice-9/boot-9.scm:
    705:2 17 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
In ice-9/eval.scm:
    619:8 16 (_ #(#(#<directory (guile-user) 1149140>)))
In guix/ui.scm:
  1692:12 15 (run-guix-command _ . _)
In ice-9/boot-9.scm:
    829:9 14 (catch _ _ #<procedure 7f193bf32e98 at guix/ui.scm:623?> ?)
    829:9 13 (catch _ _ #<procedure 7f193bf32eb0 at guix/ui.scm:746?> ?)
In guix/store.scm:
   623:10 12 (call-with-store _)
  1803:24 11 (run-with-store #<store-connection 256.99 30cd0c0> _ # _ ?)
In guix/scripts/refresh.scm:
   541:14 10 (_ _)
In srfi/srfi-1.scm:
    640:9  9 (for-each #<procedure 35fd100 at guix/scripts/refresh.?> ?)
In guix/scripts/refresh.scm:
    344:2  8 (check-for-package-update #<package [email-masked] gnu/?> ?)
In guix/import/github.scm:
   231:25  7 (latest-release #<package [email-masked] gnu/packages/ne?>)
   200:22  6 (latest-released-version "https://github.com/savoirfai?" ?)
    163:2  5 (fetch-releases-or-tags _)
In ice-9/boot-9.scm:
    829:9  4 (catch srfi-34 #<procedure 3618860 at guix/import/json?> ?)
In guix/import/json.scm:
    41:19  3 (_)
In guix/http-client.scm:
    88:25  2 (http-fetch _ #:port _ #:text? _ #:buffered? _ # _ # _ # ?)
In guix/build/download.scm:
    426:4  1 (open-connection-for-uri _ #:timeout _ # _)
    313:6  0 (tls-wrap #<closed: file 3736c40> _ # _)

guix/build/download.scm:313:6: In procedure tls-wrap:
X.509 certificate of 'api.github.com' could not be verified:
  signer-not-found
  invalid

Am I missing a dependency in my environment? Running "guix refresh"
without ./pre-inst-env and "guix environment guix --pure" works.

----
Jan Wielkiewicz