網站首頁 編程語言 正文
解決npm install 報錯 npm ERR! code 128 npm ERR! command failed npm ERR! command git ls-remote ssh://g
作者:ironybbb 更新時間: 2022-01-15 編程語言想git clone 一下vue-element-admin集成方案下來學習一下,但是在安裝依賴npm install這一步總是報錯,無法進行下一步,卡了很久:
npm ERR! code 128
npm ERR! command failed
npm ERR! command git ls-remote ssh://git@github.com/nhn/raphael.git
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
網上找到很多解決辦法,但是試過之后都沒用,比如:
git config --global http.sslverify "false"
git config --global url."https://".insteadOf git://
但最后還是這個帖子的大佬的方案最有用!配置github的ssh,
之所以是這樣,是因為本地生成的SSH keys添加到github里面,,這個生成的SSH keys 是帶有密碼的
解決方法 桌面右鍵,git bash here 輸入以下 ssh-keygen -t rsa -C “你的郵箱名稱” overwrite
輸入y 輸入密碼的時候直接回車
重復密碼輸入還是直接回車,然后把github上以前的sshkeys刪除,c盤->用戶->你的用戶名->.ssh->id_rsa.pub里邊的字符添加到
github右上角頭像->settings->ssh & GPG ->Add sshKeys ————————————————
版權聲明:本文為CSDN博主「EnglishCode」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/qq_37699336/article/details/119411507
不過,在使用大佬方法的時候還是遇到了問題,在git bash here中輸入ssh-keygen -t rsa -C “郵箱”,回車后沒有執行,而是換行出現“>”,如下:
ssh-keygen -t rsa -C “郵箱”
>
>
>
解決辦法:
命令:
ssh-keygen -t rsa -N ” -f ~/.ssh/id_rsa -q -b 2048 -C “郵箱”
參數說明:
-N ” 密碼為空;-f id_rsa是指保存文件為/.ssh/id_rsa和/.ssh/id_rsa.pub;
-q 靜默模式,和unzip的-q參數一樣的;
-b 位數,可以指定1024這類的,默認是2048;
-C comment 提供一個新注釋
這樣就可以正常執行了,當提示是否重寫overwrite,輸入y同意。
按照大佬提示的c盤->用戶->你的用戶名->.ssh->id_rsa.pub
用記事本打開即可
添加新的ssh key,再重新去git clone即可~接下來順利安裝依賴,就可以直接運行了。
原文鏈接:https://blog.csdn.net/weixin_43185419/article/details/120864285
相關推薦
- 2022-07-20 C語言深入刨析數據結構之棧與鏈棧的設計與應用_C 語言
- 2022-04-03 深入了解Python如何操作MongoDB_python
- 2023-04-01 SqlServer字符截取的具體函數使用_MsSql
- 2022-08-17 React自定義hook的方法_React
- 2022-09-04 Python推導式數據處理方式_python
- 2022-12-08 C語言如何實現成績等級判別_C 語言
- 2022-11-03 tomcat?集群監控與彈性伸縮詳解_Tomcat
- 2022-07-01 c++超細致講解引用_C 語言
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支