stencil-cli
stencil-cli copied to clipboard
Cannot install stencil-cli owing to Git permissions error
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
Hi @richardweaver is it still an issue to you?
Hi, it is an issue for us also, some corporate network don't allow git:// protocol access
@bplessis Could you please provide more details on your issue and steps to reproduce?
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
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://
@bplessis @armpogart Please try to update stencil cli to the latest version, git:// protocol deprecation was fixed there.