skip to Main Content

The step in my Docker file which reads RUN yarn install --frozen-lockfile is failing with the following error text when executed in a .github action.

It reads as though there’s a problem running git ls remote --tags --heads ssh://[email protected]/reach-sh/js-conflux-sdk.git which further seems to indicate that ‘ssh: not found’

‘ssh’ is definitely present within the build environment, and the reach-sh/js-conflux-sdk repo is not private. I cannot reproduce this on my local machine. What am I missing?

#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://[email protected]/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

I’ve attempted explicitly installing ssh into the build container which reported that ssh was already installed.

I’ve checked that git ls-remote --tags --heads ssh://[email protected]/reach-sh/js-conflux-sdk.git can be run from my local machine without any special permissions.

I’ve tried to delete and rebuild my yarn.lock file which didn’t do anything at all differently.

2

Answers


  1. Chosen as BEST ANSWER

    Thank you for that response! I ended up resolving the issue by not removing the lockfile and running with a simple yarn install but I believe have a better understanding of the issue now after your comment.


  2. I reported this issue on the Reach GitHub repository.

    This happens because the version of js-conflux-sdk – one of the stdlib dependencies – is specified as js-conflux-sdk@git+https://github.com/reach-sh/js-conflux-sdk.git#v1_6_0_blockNumber.

    This makes the build script to clone the repo using SSH ssh://[email protected]/reach-sh/js-conflux-sdk.git, which fails on a CI container because of missing SSH keys.

    This problem can be temporarily solved replacing ssh://git@ with https:// in package-lock.json and running npm ci or yarn install --frozen-lockfile.

    I suppose the source of this issue is this line.

    The version is specified referencing the github repository, which gets resolved with ssh://git@ when generating package-lock-json.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search