在我的Docker文件中,读取RUN yarn install --frozen-lockfile的步骤在.github操作中执行时出现以下错误文本失败。
它读起来好像在运行git ls remote --tags --heads ssh://git@github.com/reach-sh/js-conflux-sdk.git时出现了问题,这似乎进一步表明了'ssh: not‘
‘'ssh’绝对存在于构建环境中,并且reach-sh/js-conflux-sdk回购不是私有的。我不能在我的本地机器上复制这个。我遗漏了什么?
#10 [builder 6/7] RUN yarn install
#10 sha256:0241e5ad2b01044255a03052e8f2a2540c5fb45a447a1b93c55b90ed86436440
#10 10.84 yarn install v1.22.17
#10 11.81 [1/4] Resolving packages...
#10 12.75 [2/4] Fetching packages...
#10 13.13 error Command failed.
#10 13.13 Exit code: 128
#10 13.13 Command: git
#10 13.13 Arguments: ls-remote --tags --heads ssh://git@github.com/reach-sh/js-conflux-sdk.git
#10 13.13 Directory: /apps/launchpad-api
#10 13.13 Output:
#10 13.13 "ssh" -oBatchMode=yes: line 1: ssh: not found
#10 13.13 fatal: Could not read from remote repository.
#10 13.13
#10 13.13 Please make sure you have the correct access rights
#10 13.13 and the repository exists.
#10 13.13 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#10 ERROR: executor failed running [/bin/sh -c yarn install]: exit code: 128
------
> [builder 6/7] RUN yarn install:
------
executor failed running [/bin/sh -c yarn install]: exit code: 128我试图显式地将ssh安装到构建容器中,该容器报告已经安装了ssh。
我已经检查了git ls-remote --tags --heads ssh://git@github.com/reach-sh/js-conflux-sdk.git是否可以在没有任何特殊权限的情况下从本地机器上运行。
我尝试删除和重建我的yarn.lock文件,它没有做任何不同的事情。
发布于 2022-03-24 22:20:22
我在Reach GitHub存储库中报告了GitHub。
这是因为js-conflux-sdk的版本-- stdlib依赖项之一--被指定为js-conflux-sdk@git+https://github.com/reach-sh/js-conflux-sdk.git#v1_6_0_blockNumber。
这使得构建脚本使用SSH ssh://git@github.com/reach-sh/js-conflux-sdk.git克隆回购,因为缺少SSH键,CI容器上出现故障。
这个问题可以暂时解决,在ssh://git@中用https://代替package-lock.json,运行npm ci或yarn install --frozen-lockfile。
我想这个问题的根源应该是这条线。
指定版本引用github存储库,在生成ssh://git@时使用package-lock-json解析该存储库。
发布于 2022-04-01 03:23:44
谢谢你的回应!我最终解决了这个问题,没有删除锁文件并使用一个简单的yarn install运行,但是我相信在您发表评论之后,我现在对这个问题有了更好的理解。
https://stackoverflow.com/questions/71581607
复制相似问题