Hello,
I have a private gitlab repository as a package in my package.json for my react app. So I need to add a ssh key before downloading my dependencies. I added an env variable GIT_SSH_KEY_GITLAB and tried to use it like this (extract from my render.yaml):
- type: web
name: "MYREACTAPP"
env: static
branch: develop
staticPublishPath: ./app/dist
buildCommand: eval `ssh-agent -s`; ssh-add - <<< "${GIT_SSH_KEY_GITLAB}"; pnpm i; pnpm build:all
envVars:
- key: GIT_SSH_KEY_GITLAB
sync: false
- key: SKIP_INSTALL_DEPS
value: true
autoDeploy: false
But I get this error when executing the build command :
Error loading key "/dev/fd/63": invalid format
I tried to add /n in my private key, with and without quotes,… but nothing seems to work. My key is valid and there is “-----BEGIN OPENSSH PRIVATE KEY-----” at the begining and “-----END OPENSSH PRIVATE KEY-----” at the end.
Someone has an idea of what could make it work ?
Thank you and have a nice day !