Unable to pass SSH Private Key as --build-arg #761
Labels
area/usability
For all bugs related to how people use kaniko, option and feature flags, etc
kind/question
Further information is requested
priority/awaiting_evidence
waiting on user's input before we can close of assign priority
stale
Actual behavior
I have added my SSH private and public key as secrets inside my Jenkins master. Inside the Jenkinsfile, I fetch these secrets and then pass them to Kaniko using
--build-arg pub_key=${JENKINS_SECRET_PUB_KEY}
and--build-arg=pub_key=${JENKINS_SECRET_PRIV_KEY}
The public key is passed correctly however I get the following error for the private key:
Error: bad flag syntax: -----END Usage: executor [flags]
The
-----END
is indicating the end of the private key text. I'm assuming there's some problem with parsing the private key text since it ends like this...D32UDBw== -----END OPENSSH PRIVATE KEY-----
The = sign at the end might be throwing Kaniko off.
Expected behavior
To be able to pass a SSH private key to the Dockerfile as
--build-arg
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: