Closed lucabello closed 1 year ago
All the problems pointed out in the issue have been addressed, and I've tested the charm locally, proving it works with private repos :)
Additionally, I added some remarks/docs in the README pointing out how the feature should be used (including how to correctly specify the key through juju config
)
Issue
Closes #66
Solution
The Key permission problem has been solved by simply changing the permissions of the private key file to
600
.For the
known_hosts
problem, (file missing and manual trust prompt), the charm is now parsing thegit_repo
for the remote (e.g.,github.com
,git.launchpad.net
) and automatically adding the remote's public key toknown_hosts
throughssh-keyscan {remote}
.Note that this happens on config-changed, meaning that the charm will temporarily (until the first config-changed) fail the sync on
juju deploy
, but it's probably not an issue :)I also updated the README to document the feature!