We need to build a private GitHub project, the snap build needs to clone a source, how do I push my ssh key to multipass based VM so it can successfully clone it ?
Commenting again, so that this one gets a bump.
Hi @om26er, this would require patching snapcraft
as the only way to influence it would be via cloud-init
. snapcraft
currently has a baked-in cloud-config
data, which you’d have to be able to modify.
While that’s not available, you may need to drive the build manually yourself, something I did to multipass
itself while snapcraft’s missing LXD support. You could do similar with LXD or with Multipass, even passing your own custom cloud-config
as needed.
1 Like
Revisiting this again today. Is there a snapcraft flag to tell it to bind-mount the host ~/.ssh
directory into the build environment ?