小编Phi*_*ipp的帖子

在 Powershell 中 npm install private Gitlab Repo Permission Denied (publickey)

我尝试通过 npm 将私有 gitlab 存储库安装到另一个节点项目。命令是npm install --save gitlab:my-project#master This failed with

npm ERR! 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.
Run Code Online (Sandbox Code Playgroud)

我有以下设置:Windows 10、git 和 Powershell。

直接在 Powershell 中使用 git 命令工作正常,例如git pull询问我的私钥的密码并且它工作正常。除了npm install似乎在内部使用 git的命令之外,所有其他 git 东西都可以正常工作。

如果我使用在 Windows 上随 git 安装的 git bash,我可以运行 npm 命令并安装私有存储库。它仅在 Powershell 中失败。

尽管如此,人们可以说:使用 git bash,但我以某种方式习惯了 PowerShell。:)

windows ssh powershell git permissions

7
推荐指数
1
解决办法
7226
查看次数

标签 统计

git ×1

permissions ×1

powershell ×1

ssh ×1

windows ×1