網站首頁 編程語言 正文
錯誤code128:npm ERR! An unknown git error occurred command git --no-replace-objects ls-remote ssh://
作者:云邊的快樂貓 更新時間: 2024-03-20 編程語言目錄
一、遇到問題
二、出現問題的原因?
三、解決辦法
四、類似的錯誤
一、遇到問題
在使用命令npm install下載依賴項的時候就遇到了這個問題,切換了國內的淘寶源也下載不了。
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects 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!
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! D:\IT_base\node16\node_cache\_logs\2023-09-16T05_03_02_827Z-debug-0.log
二、出現問題的原因?
?git上面拉取東西時候出現了問題
三、解決辦法
1.項目里面執行這個命令
git config --global url."https://".insteadOf ssh://git@
?這個命令的作用是將 Git 在使用 SSH 克隆(或拉取)倉庫時的默認 URL 協議從 SSH 更改為 HTTPS。這是一個 Git 的配置設置,它可以對你的 Git 操作產生影響。
通常情況下,當你使用 SSH 協議克隆或拉取 Git 倉庫時,URL 的格式是
ssh://git@github.com/username/repo.git
,其中git@github.com
是 SSH URL。但有時,你可能希望將 Git 操作重定向到使用 HTTPS 協議,例如https://github.com/username/repo.git
,這樣可以避免 SSH 密鑰的設置和管理。使用
git config
命令設置url."https://".insteadOf ssh://git@
后,Git 將默認使用 HTTPS 協議而不是 SSH 協議來訪問遠程倉庫,以便執行克隆、拉取等操作。這對于那些不想或不需要使用 SSH 密鑰的情況非常有用。注意,這個配置是全局配置,會影響你系統中的所有 Git 倉庫。如果你只想在特定倉庫中使用 HTTPS 協議,你可以在該倉庫的
.git/config
文件中進行配置,而不是全局配置。
2.執行下載依賴項的命令
npm install
這樣依賴項就下載成功了
?
四、類似的錯誤
解決npm install遇到的問題:Error while executing:_云邊的快樂貓的博客-CSDN博客
原文鏈接:https://blog.csdn.net/m0_52861000/article/details/132917423
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2024-03-20 redis閃退的三大解決辦法(windows版本)
- 2023-01-19 Python中方法的缺省參數問題解讀_python
- 2022-01-21 Docker報錯:OCI runtime exec failed: exec failed: con
- 2022-04-10 elasticsearch + spring boot 配置
- 2022-07-26 TensorFlow使用keras報錯ImportError: cannot import name
- 2021-12-10 addEventListener的執行函數使用具名函數并傳參,可使用removeEventListe
- 2022-06-24 Android音視頻開發之MediaExtactor使用教程_Android
- 2022-09-05 詳解apache編譯安裝httpd-2.4.54及三種風格的init程序特點和區別_Linux
- 欄目分類
-
- 最近更新
-
- 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同步修改后的遠程分支