vendir
vendir copied to clipboard
OpenSSH-generated private keys do not work in App CR
When creating an App object using a ssh-git source and ssh private key, if the key was generated using openssh (default on MacOS as of this date) then it will fail complaining of key formatting.
usefulErrorMessage: "Error: Syncing directory '0': Syncing directory '.' with git
contents: Fetching git repository: Git [fetch origin]: exit status 128 (stderr:
Failed to add the host to the list of known hosts (/home/kapp-controller/.ssh/known_hosts).\r\nLoad
key \"/etc/kappctrl-mem-tmp/kapp-controller-fetch-template-deploy420243064/.vendir-tmp/incoming/git-auth/private-key\":
invalid format\r\[email protected]: Permission denied (publickey).\r\nfatal: Could
not read from remote repository.\n\nPlease make sure you have the correct access
rights\nand the repository exists.\n)\n"
What are the headers of your private key? Like -----BEGIN OPENSSH PRIVATE KEY-----
or what?
A repro of this would be helpful.
Ah, I see the thread on Slack mentions that it is -----BEGIN OPENSSH PRIVATE KEY-----
and that appears to be the problem
Yes, sorry I should have been more specific. That header is specifically what triggers it I believe. When I switched to something with -----BEGIN RSA PRIVATE KEY-----
it worked