Can I pass a password in a crontab command pipe to make access to a git repository ssh server? like
*/10 * * * cd /path/gitpath/ && git pull ssh://user:password@XXX.XX.XX.XXX/path/reporitory.git
Or it's better cron a bash script with password?
Can I pass a password in a crontab command pipe to make access to a git repository ssh server? like
*/10 * * * cd /path/gitpath/ && git pull ssh://user:password@XXX.XX.XX.XXX/path/reporitory.git
Or it's better cron a bash script with password?
I would recommend setting up ssh public/private keys, if you can. That way you wouldn't need to use a password when pulling from the repo.
https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/