Error Message and Logs
2026-Apr-05 16:54:32.922817
#27 1.875 warning: spurious network error (2 tries remaining): process didn't exit successfully: `git fetch --tags --force --update-head-ok 'ssh://<REDACTED>.git' '+refs/heads/*:refs/remotes/origin/*' '+HEAD:refs/remotes/origin/HEAD'` (exit status: 128)
2026-Apr-05 16:54:36.200954
#27 5.479 Load key "/root/.ssh/id_ed25519": error in libcrypto
Steps to Reproduce
- Create an application
- Enable
Use Docker Build Secrets for env vars
- Add a multiline env var, e.g., SSH private key for build time
- Use the secret in a Dockerfile:
RUN --mount=type=secret,id=SSH_KEY,target=/root/.ssh/id_ed25519 <COMMAND>
Example Repository URL
No response
Coolify Version
v4.0.0-beta.470
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Debian 13
Additional Information
It seems like Coolify removes trailing newlines from multiline environment variables (such as SSH private keys). This causes git to fail reading the private key when I try to import it as a build secret in my Dockerfile.
Maybe it would be a good idea to add an option to disable the removal of trailing whitespace and newlines in such cases? Unfortunately, using literal values and \n in my private key variable did not work.
Error Message and Logs
Steps to Reproduce
Use Docker Build Secretsfor env varsRUN --mount=type=secret,id=SSH_KEY,target=/root/.ssh/id_ed25519 <COMMAND>Example Repository URL
No response
Coolify Version
v4.0.0-beta.470
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Debian 13
Additional Information
It seems like Coolify removes trailing newlines from multiline environment variables (such as SSH private keys). This causes git to fail reading the private key when I try to import it as a build secret in my Dockerfile.
Maybe it would be a good idea to add an option to disable the removal of trailing whitespace and newlines in such cases? Unfortunately, using literal values and
\nin my private key variable did not work.