electron-releases
electron-releases copied to clipboard
Cannot install package on Windows An unknown git error occurred
When i'm trying to install package on Windows with command npm install "https://github.com/castlabs/electron-releases#v31.3.0+wvcus" --save-dev I'm still getting error:
0 verbose cli C:\Users\kryst\AppData\Local\fnm_multishells\13448_1722444081793\node.exe C:\Users\kryst\AppData\Local\fnm_multishells\13448_1722444081793\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:C:\Users\kryst\AppData\Roaming\fnm\node-versions\v20.16.0\installation\node_modules\npm\npmrc
4 silly config load:file:D:\Projects\project\.npmrc
5 silly config load:file:C:\Users\kryst\.npmrc
6 silly config load:file:C:\Users\kryst\AppData\Local\fnm_multishells\13448_1722444081793\etc\npmrc
7 verbose title npm install https://github.com/castlabs/electron-releases#v31.3.0+wvcus
8 verbose argv "install" "https://github.com/castlabs/electron-releases#v31.3.0+wvcus" "--save-dev"
9 verbose logfile logs-max:10 dir:C:\Users\kryst\AppData\Local\npm-cache\_logs\2024-07-31T16_43_33_038Z-
10 verbose logfile C:\Users\kryst\AppData\Local\npm-cache\_logs\2024-07-31T16_43_33_038Z-debug-0.log
11 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
12 silly logfile done cleaning log files
13 verbose stack Error: An unknown git error occurred
13 verbose stack at makeError (C:\Users\kryst\AppData\Roaming\fnm\node-versions\v20.16.0\installation\node_modules\npm\node_modules\@npmcli\git\lib\make-error.js:28:13)
13 verbose stack at C:\Users\kryst\AppData\Roaming\fnm\node-versions\v20.16.0\installation\node_modules\npm\node_modules\@npmcli\git\lib\spawn.js:37:26
13 verbose stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
14 error code 3221225595
15 error An unknown git error occurred
16 error command git --no-replace-objects ls-remote ssh://[email protected]/castlabs/electron-releases.git
17 silly unfinished npm timer reify 1722444213496
18 silly unfinished npm timer reify:loadTrees 1722444213500
19 silly unfinished npm timer idealTree:userRequests 1722444213507
20 verbose cwd D:\Projects\project
21 verbose os Windows_NT 10.0.22631
22 verbose node v20.16.0
23 verbose npm v10.8.1
24 verbose exit 3221225595
25 verbose code 3221225595
I cannot find any solution on web for this. I was trying to install using another versions of node and npm but it's not helping.
Strange, can you run the failing command line directly outside of npm? I.e execute:
git --no-replace-objects ls-remote ssh://[email protected]/castlabs/electron-releases.git
I can't repro this on my Windows box, or anywhere else, when using npm. I can however get the error if I explicitly use the above git command on a machine where the public key that matches what I have registered with GitHub is missing (since ssh transport is used).
I'm not sure why, but in your case it seems that npm opts to use ssh as the transport layer, which requires that a public key is registered on GitHub. Probably something specific to your setup since I'm not able to reproduce it. AFAICT you either need to figure out what is different with your setup, or register a public key on GitHub to allow the use of ssh.
Yes i can run this command without any problems. I have already registred ssh key on github and when i call command
ssh -T [email protected] I see message that i'm successfully authenticated.