stencil-cli icon indicating copy to clipboard operation
stencil-cli copied to clipboard

Cannot install stencil-cli owing to Git permissions error

Open richardweaver opened this issue 3 years ago • 6 comments

Expected behavior

npm i -g @bigcommerce/stencil-cli should install stencil-cli

Actual behavior

An error received during installation:

npm ERR! Error while executing:
npm ERR! C:\Users\XXXXXXX\AppData\Local\Programs\Git\cmd\git.EXE ls-remote -h -t
git://github.com/bigcommerce-labs/node-sass.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 140.82.121.4]: errno=No such file or directory
npm ERR!
npm ERR!
npm ERR! exited with error code: 128

Steps to reproduce behavior

I have run the npm install command on both Windows and Mac with the same result. I'm running Node 12.16.3/NPM 6.14.4 on Windows and Node 12.22.0/NVM 6.14.4 on Windows

richardweaver avatar Apr 06 '21 13:04 richardweaver

Hi @richardweaver is it still an issue to you?

jairo-bc avatar Jul 01 '21 14:07 jairo-bc

Hi, it is an issue for us also, some corporate network don't allow git:// protocol access

bplessis avatar Oct 22 '21 08:10 bplessis

@bplessis Could you please provide more details on your issue and steps to reproduce?

jairo-bc avatar Oct 22 '21 10:10 jairo-bc

It's exactly the same steps as the initial reporter, the issue is that somewhere in your dependency stack the repository access is hardcoded as using the git:// protocol (ie using tcp port 9418) which is more efficient that http/https git access but sadly not always open in corporate firewalls

bplessis avatar Oct 22 '21 12:10 bplessis

git:// protocol is deprecated and turned off as March 15, 2022 (https://github.blog/2021-09-01-improving-git-protocol-security-github/). The solution for this problem now until bigcommerce updates it on their side is to add following config:

git config --global url."https://".insteadOf git://

which will add following to your .gitconfig:

[url "https://"]
    insteadOf = git://

armpogart avatar Jun 05 '22 16:06 armpogart

@bplessis @armpogart Please try to update stencil cli to the latest version, git:// protocol deprecation was fixed there.

jairo-bc avatar Jun 06 '22 08:06 jairo-bc