Answer the question
In order to leave comments, you need to log in
How to autocommit on cron?
Hello! I went along the following path:
- in the folder of the sudo-user "sudouser" /home/sudouser/scripts I placed commit.sh with the following content:
#!/bin/bash
cd /var/www/domain/data/www/test.domain.ru && git add .
cd /var/www/domain/data/www/test.domain.ru && git commit -a -m 'autocommit'
cd /var/www/domain/data/www/test.domain.ru && git push origin master
Warning: Permanently added the RSA host key for IP address 'XX.XXX.XX.XXX' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question