【发布时间】:2019-07-10 18:48:41
【问题描述】:
我正在尝试 yarn add jest 到我克隆到我的机器上的工作仓库。
C:\COMPANY_NAME\Work-Folder\frontend>yarn add jest
yarn add v1.13.0
[1/4] Resolving packages...
[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git@github.com:COMPANY_NAME/SOME_REPO.git
Directory: C:\COMPANY_NAME\Work-Folder\frontend
Output:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
当我使用 Github Desktop for Windows 尝试从源拉取时,会发生类似的问题。我设置了 SSH 密钥和一些东西,这样当我运行 git pull origin 时,命令提示符会询问我的密码。
我认为对于上述错误,我需要以某种方式向yarn 提供我的 Github 密码或其他东西。
关于如何解决这个问题的任何想法?
【问题讨论】: