Git克隆和npm安装权限被拒绝(publickey)

时间:2018-03-25 11:36:29

标签: git npm

我通过https克隆了现有的仓库(不是我的)。之后我尝试安装一些东西,例如:

  

npm install angularfire2 / storage

然后我收到错误:

npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/angularfire2/storage.git
npm ERR!
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!
npm ERR! exited with error code: 128

我知道我没有权利在这个回购中写作。然后我试图将它移动到我的仓库(git set url),但这没有帮助。

如何让我可以写任何内容?

1 个答案:

答案 0 :(得分:2)

这意味着,在您的本地计算机上,您还没有制作任何SSH密钥。不用担心。以下是如何修复: https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/