Cannot Install NPM Package – Code 128 An unknown git error occurred

I’m trying to install the package @truffle/hdwallet-provider .

As written in the doc, I’m running:

npm i @truffle/hdwallet-provider

Here is the error message I’m getting:

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="eb8c829fab8c829f839e89c5888486">[email protected]</a>/ethereumjs/ethereumjs-abi.git
npm ERR! <a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ddbab4a99dbab4a9b5a8bff3beb2b0">[email protected]</a>: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-08T14_13_15_122Z-debug-0.log

Here are the logs:

698 verbose Linux 5.13.0-30-generic
699 verbose argv "/usr/bin/node" "/usr/bin/npm" "i" "@truffle/hdwallet-provider"
700 verbose node v14.17.6
701 verbose npm  v8.5.3
702 error code 128
703 error An unknown git error occurred
704 error command git --no-replace-objects ls-remote ssh://<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cbaca2bf8baca2bfa3bea9e5a8a4a6">[email protected]</a>/ethereumjs/ethereumjs-abi.git
705 error <a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="56313f2216313f223e23347835393b">[email protected]</a>: Permission denied (publickey).
705 error fatal: Could not read from remote repository.
705 error
705 error Please make sure you have the correct access rights
705 error and the repository exists.
706 verbose exit 128
707 timing npm Completed in 6266ms
708 verbose unfinished npm timer reify 1646748520075
709 verbose unfinished npm timer reify:loadTrees 1646748520084
710 verbose code 128
711 error A complete log of this run can be found in:
711 error     /root/.npm/_logs/2022-03-08T14_08_39_958Z-debug-0.log

My node version:

v14.17.6

My NPM version:

v8.5.3

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Actually, it’s a well-known bug.
https://github.com/trufflesuite/truffle/issues/2852

Using this solved the problem:

npm i @truffle/<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a5cdc1d2c4c9c9c0d188d5d7cad3ccc1c0d7e5cbc0ddd1">[email protected]</a>


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x