I have a dependency in my build that checks out another project from GitHub. My circleci job has an associated user key, this user has access to both the parent and the dependency. yarn install locally works fine.
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/install for documentation about this command.
Exited with code 1
Any ideas why this is failing, I also tried to add a SSH key under “SSH Permissions” but this didn’t help.
Update: I added the add_ssh_keys step to add my SSH key but it still wasn’t picked up by yarn.
I have recently had a similar issue (I was trying to configure AWS but I assume my problem and yours have this similarity) and was able to resolve it by creating the .ssh directory on the machine and manually creating the credential file that is needs for git integration.
This is how I create the file: command: cd ~ && mkdir .ssh && cd .ssh && touch id_rsa
And then to add the values: echo -e "$PRIVATE_KEY" > ~/.ssh/id_rsa
Where you would need to set your private key, this was a solution I found could set variables in an area that tools like npm and git could find.