2

In my case, I am trying to use coc-clangd at work where we have a firewall, preventing access to external resources (like github). There is however a way to have a local mirror of github repos. This is where i have copies of coc.nvim and clangd/coc-clangd:

Installing this extension, however, doesn't work out of the box:

First method: :CocInstall http://companymirror/github/clangd/coc-clangd.git

results ... in is not supported, coc.nvim support github.com only

Second method: Plug 'clangd/coc-clangd', {'do': 'yarn install --frozen-lockfile'} (in .vimrc with vim-plug) results in an error on :PlugInstall:


    warning package.json: License should be a valid SPDX license expression
    warning coc-clangd@0.4.10: License should be a valid SPDX license expression
    [1/5] Validating package.json...
    warning coc-clangd@0.4.10: License should be a valid SPDX license expression
    warning coc-clangd@0.4.10: The engine "coc" appears to be invalid.
    [2/5] Resolving packages...
    [3/5] Fetching packages...
    error An unexpected error occurred: "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz: self signed certificate in certificate chain".
    info If you think this is a bug, please open a bug report with the information provided in "/home/user/.vim/plugged/coc-clangd/yarn-error.log".
    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

where /home/user/.vim/plugged/coc-clangd/yarn-error.log has:

Arguments:

      /usr/local/node-v12.18.0-linux-x64/bin/node /usr/share/yarn/bin/yarn.js install --frozen-lockfile
    PATH:
      /usr/local/node-v12.18.0-linux-x64/bin:/software/centos7/binutils/2.30/bin:/software/centos7/ccache/3.2.2/bin:/software/centos7/cmake/3.13.2/bin:/software/centos7/gdb/8.1/bin:/software/centos7/gcc/8.2.0/bin:/home/user/bin/fzf/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/user/.fzf/bin:/usr/lib/llvm10/10.0.0/bin/:/home/user/.local/bin:/home/user/bin/fzf-0.17.5/:/home/user/bin
    Yarn version:
      1.22.4
    Node version:
      12.18.0
    Platform:
      linux x64
    Trace:
      Error: self signed certificate in certificate chain
          at TLSSocket.onConnectSecure (_tls_wrap.js:1506:34)
          at TLSSocket.emit (events.js:315:20)
          at TLSSocket._finishInit (_tls_wrap.js:948:8)
          at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12)

System information:

Clangd version: 10.0.0

Operating system: CentOS 7.3

EDIT: There is no proxy server available, that could allow to make use of http_proxy like env variables.

EDIT 2: This appeared to be an issue with yarn configuration. this question gave a hint to run yarn config set "strict-ssl" false -g, which turned off certificate checking and let me install the extension!

ambushed
  • 533
  • 1
  • 5
  • 14
  • 1
    I guess it depends on your firewall. Settings the usual `$https_proxy` & co variables did the job [for me](https://github.com/neoclide/coc.nvim/issues/1416). IMO, you should try on official channels instead of here. – Luc Hermitte Jun 16 '20 at 19:34
  • I posted this question in "Issues" of `clangd/coc-clangd` github repo with a label "Bug", but felt a bit conflicted about it. I could only chose between "Bug" and "Improvement", while this is just a quesiton, definitely not a bug or an improvement suggestion. Thus, i though, i'd shoot it here as well since SO is more of a platform for questions than anything else. – ambushed Jun 16 '20 at 20:10
  • 1
    The "bug" could be about the documentation not being explicit enough about firewalls. But I was thinking about the chat: _"If you have a question, ask on gitter"_. EDIT: I though it was a coc issue, hence my last remark... as it's coc that installs its plugins – Luc Hermitte Jun 16 '20 at 20:16
  • totally forgot about gitter, good tip! – ambushed Jun 16 '20 at 20:30
  • yeah and there is no http proxy that i can use, unfortunately. – ambushed Jun 16 '20 at 20:53

0 Answers0