Issue running git pull command from crontab on mac OS

I am trying to run the git pull command automatically using crontab. I am on MacOs machine. Git pull is working fine when I use it without cron but giving error with cron. I have tried various solution given for it. Some of them are below. They all are working fine manually.

I have tried putting below command in a script automate.sh and then run it using cron.

  1. ssh-agent bash -c 'ssh-add /Users/{username}/.ssh/id_rsa; /usr/bin/git pull'

  2. eval ssh-agent -s && ssh-add ~/.ssh/id_rsa && ssh-add -l && git pull

But I am always getting below error,

fatal: could not read Username for 'https://git.{domain}.com': Device not configured

Can anyone please check it?



from Recent Questions - Stack Overflow https://ift.tt/3GwdgWF
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations