Installation on windows behind a proxy fails

What happened?

I currently have to use Windows Server and hence MINGW64. In addition, I am sitting behine a corporate proxy. So gitconfig is configured to use the proxy for outoing connections. Plus, as we also have self-signe certificates which are in the credentials store of the Windows host, the sslBackend has to be configured accordingly. So my .gitconfig looks like this:

[http "https://github.com"]
    proxy = http://:@webproxy.intra:8888
[http "https://git.savannah.gnu.org"]
    proxy = http://:@webproxy.intra:8888
sslBackend = schannel

However the installation fails

What did you expect to happen?

I expect it to download related stuff and install goes without any issue

Steps to reproduce

1.Install emacs using chocolatey

choco install emacs.install
  1. Clone [doomemacs] and trigger installation
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d
~/.emacs.d/bin/doom install

This fails with

> Installing Doom Emacs!
- Skipping ~/.doom.d/ (already exists)
  - Skipping init.el (already exists)
  - Skipping config.el (already exists)
  - Skipping packages.el (already exists)
Generate an envvar file? (see `doom help env` for details) (y or n) > Generating envvars file
  âo" Generated ~/.emacs.d/.local/env
Installing plugins
> Installing straight...
x There was an unexpected runtime error
  Message: File is missing
  Details: ("Cannot open load file" "No such file or directory" "c:/Users/papanito/.emacs.d/.local/straight/repos/straight.el/straight.el")
  Backtrace:
    (require straight "c:/Users/papanito/.emacs.d/.local/straight/repos/straight.el/straight.el")
    (let ((repo-dir (doom-path straight-base-dir "straight/repos/straight.el")) (repo-url (concat "http" (if gnutls-verify-error "s") "://github.com/" (or (plist-get recipe :repo) "radian-software/straight.el"))) (branch (or (plist-get recipe :branch) straight-repository-branch)) (call (if init-file-debug #'(lambda (&rest args) (doom-print (doom-print--format "%s" (cdr (apply #'doom-call-process args))))) #'(lambda (...
    (let ((process-environment (copy-sequence process-environment))) (setenv "GIT_CONFIG" nil) (setenv "GIT_CONFIG_NOSYSTEM" "1") (setenv "GIT_CONFIG_GLOBAL" (or (getenv "DOOMGITCONFIG") "/dev/null")) (let ((repo-dir (doom-path straight-base-dir "straight/repos/straight.el")) (repo-url (concat "http" (if gnutls-verify-error "s") "://github.com/" (or (plist-get recipe :repo) "radian-software/straight.el"))) (branch (o...
    (doom--ensure-straight (:host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files ("straight*.el")) "e20a44c4ac5c04896aecd43a5fdd12c67527c69e")
    (let* ((--cl-rest-- (alist-get 'straight packages)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (pin (car (cdr (plist-member --cl-rest-- ':pin))))) (doom--ensure-straight recipe pin))
    (let ((packages (doom-package-list '((:core))))) (let* ((--cl-rest-- (alist-get 'straight packages)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (pin (car (cdr (plist-member --cl-rest-- ':pin))))) (doom--ensure-straight recipe pin)) (doom--ensure-core-packages (seq-filter #'(lambda (%) (eq (plist-get % :type) 'core)) packages)))
    (progn (if doom-inhibit-log nil (doom--log "Initializing straight")) (let ((packages (doom-package-list '((:core))))) (let* ((--cl-rest-- (alist-get 'straight packages)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (pin (car (cdr (plist-member --cl-rest-- ':pin))))) (doom--ensure-straight recipe pin)) (doom--ensure-core-packages (seq-filter #'(lambda (%) (eq (plist-get % :type) 'core)) packages))))
    (if (or force-p (null (and (boundp 'straight-recipe-repositories) straight-recipe-repositories))) (progn (if doom-inhibit-log nil (doom--log "Initializing straight")) (let ((packages (doom-package-list '((:core))))) (let* ((--cl-rest-- (alist-get 'straight packages)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (pin (car (cdr (plist-member --cl-rest-- ':pin))))) (doom--ensure-straight recipe pin)) (do...
    (doom-initialize-core-packages nil)
    (doom-initialize-packages)
    (doom-packages-install)
    (if (eq install\? :no) (doom-print (doom-print--format (doom-print--class 'warn "Not installing plugins, as requested"))) (doom-print (doom-print--format "Installing plugins")) (doom-packages-install))
  ! Wrote extended backtrace to ~/.emacs.d/.local/logs/cli.doom.220928141637.836.error
  Finished in 46.28007s

System information


Loading data dump...

Remarks

I am totally new to emacs and lisp, I am currently reading trough the docu to find some indication what I might missing.

Doom intentionally ignores system git config. To bypass this, set DOOMGITCONFIG to the location of the git config file you want it to use.

DOOMGITCONFIG=~/.config/git/config doom sync
1 Like

Thanks for the hint, so I tried that.

DOOMGITCONFIG=~/.gitconfig doom install

I still get the same error. In the error message I see gnutls-verify-error. Not sure if I understand what happens there, but I suspect it tries to use http if the https verification fails. As http will not work, mabye there is an issue with the cert? So I though, maybe it works if I follow the suggestion from this blog. So I explicitly add the cert.pem containing the self-signed certificates into ~/.doom.d/init.el as follows

(require 'gnutls)
(add-to-list 'gnutls-trustfiles "~/cert.pem")

However I still get the same error as above.

What I had to do is go to c:/Users/papanito/.emacs.d/.local/straight/ and do a git pull origin master. After that, DOOMGITCONFIG=~/.gitconfig doom install worked like a charm.

Still after starting emacs, I get an error

Error (user-package): Failed to parse package consult-dir: Cannot open load file: No such file or directory, bind-key

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.