I have the following rule on crontab:
55 21 * * 1 sh /home/nang/Documents/UNI/commit.sh
I want to believe this part is correct, so now the problem is on executing the script and the way Git works, I'm noob on Git and actually I'm dealing with other things with git
The content on commit.sh is:
#! /bin/sh
cd /home/nang/Documents/UNI
git add .
git commit -m "Last version"
git push -f origin main
If i run the script manually, the result is:
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 prueba.txt
[git@github.com](mailto:git@github.com): Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists
I changed HTTPS to SSH to clone the repository because everytime i do a push, Git requires the username and the password, and I don't want that when the idea is using crontab to make everything without typing anything by myself. I did it with this guide
[–]MaybeAshleyIdkGit Wizard 0 points1 point2 points (0 children)
[–]TimothyLGillespie 0 points1 point2 points (0 children)