[英]npm install windows vs raspberry pi, very different with respect to github private module/repo
我正在嘗試使用私有github repo作為npm模塊。 Rapsberry pi / Debian與Windows 10的行為差異很大,甚至認為它們具有相同版本的npm。
npm-Windows和rasberry上的v給5.6.0
我在兩者上都創建了一個名為“ junk”的目錄,並稱為“ npm init”。 這給了我一個package.json。
npm install git + https://github.com/ my_user_id / project_name .git
在Windows上,它將創建node_modules,其project_name目錄包含所有文件。
在樹莓派上,我收到錯誤/ usr / bin / git ls-remote -h -t https://github.com/ my_user_id / project_name remote:無效的用戶名或密碼。
為什么這在Windows上有效但在樹莓上無效?
任何見識將不勝感激。
我對npm不太了解,但是看起來它阻止git交互地詢問密碼。 在Windows上,您可以將其存儲在系統憑證管理器中。 您可以在樹莓派上設置類似的內容:
git config --global credential.helper cache
git ls-remote URL #it should ask for password
npm install....
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.