Shared-Reality-Lab / IMAGE-server

IMAGE project server components
Other
2 stars 7 forks source link

restoreunstable script fails on `git pull` due to missing ssh keys when run via cron #875

Closed jeffbl closed 2 months ago

jeffbl commented 3 months ago

On unicorn, we have a script in /etc/cron.daily/image_daily_cron that runs /var/docker/image/bin/restoreunstable to make sure we pick up changes and reset the test server to a known-good state every morning. Right now, that does a su jeffbl so that it has permissions to do all the things, but this fails on git pull since it is trying to do a keypair authentication, and that fails since I use a keystore on my local machine being passed through, which is not accessible when running automatically in the cron job. The server repo is public, so this should not be blocking. Possible solutions here:

https://stackoverflow.com/questions/39687911/git-permission-error-on-a-public-repo

But I don't know if there are better options. I'm loathe to store keys on unicorn that give IMAGE repo access, since I don't consider unicorn secure.

shahdyousefak commented 2 months ago

Changes in /var/docker/image/bin/restoreunstable & /var/docker/image/bin/image_daily_cron