Closed feerlessleadr closed 4 years ago
Same setup as me using headless ubuntu VM. It only works for me if I use root crontab. At that point, you can also pull sudo from your command. Just remember that root's key will be in /.ssh
and not your home directory.
Thanks - turns out that I was doing a couple things wrong. I was already running the script in my root crontab, so I didn't need to run it with sudo.
Second, when I set up my credentials helper, I did it under my names user account, and not under my root account.
I re-ran the credentials helper under the root account, and everything worked as it should.
Hi - First off, thanks for pulling this together, it is awesome.
I followed the instructions, and when I manually run the script on my 'push' pihole, everything in my git repo is updated as expected. However, when I try to run the script via cron, my repo is not updated.
I piped the output of the cron job to a log file, and it looks like everything is doing what it should, so I"m not sure what I'm doing wrong. Here is the relevant details:
Pihole is running on Ubuntu server 18.04
Line in my root crontab: (this is just for testing purposes, which is why I have it running every minute)
Output of above:
No matter how many times I let the cron job run, my git repo is never updated.
When I run the script manually with the following (no sudo or anything is needed):
I get the same output, but the git repo is updated.
Any idea on what I could be doind wrong?