1

I have some repos which are both in SVN and Git. My username is guyfawkes, and in my home directory I have folder www which contains all my repos. In this directory I also have file update.sh:

[guyfawkes@guyfawkes-desktop ~/www]$ cat update.sh
cd /home/guyfawkes/www
cd crm
echo "upd crm"
svn up
echo "update crm completed"
echo "-------"
cd ../crm_sql
echo "upd sql"
svn up
echo "update sql completed"
echo "-------"
cd ../crm_old
echo "upd old"
svn up
echo "update old completed"
echo "-------"
cd ../mysqldiff
echo "upd mysqldiff"
git pull sotmarket master
echo "update mysqlidff completed"
git push origin master
echo "push to github completed"
echo "-------"
cd ../mysql-migration-manager
echo "upd mmmm"
git pull
echo "mmm updated"
cd data
echo "upd data"
git pull
echo "data updated"

My crontab is:

[guyfawkes@guyfawkes-desktop ~/www]$ crontab -l
*/5 * * * * /home/guyfawkes/www/update.sh

So, it works perfectly with svn repos, but I have this mails in /var/spool/mail/guyfawkes (from cron):

X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/guyfawkes>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=guyfawkes>
X-Cron-Env: <USER=guyfawkes>

upd crm

Fetching external item into 'public/old'
External at revision 32674.

At revision 483.
update crm completed
-------
upd sql
At revision 29.
update sql completed
-------
upd old
At revision 32674.
update old completed
-------
upd mysqldiff
Permission denied (publickey,keyboard-interactive).
fatal: The remote end hung up unexpectedly
update mysqlidff completed
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
push to github completed
-------
upd mmmm
Permission denied (publickey,keyboard-interactive).
fatal: The remote end hung up unexpectedly
mmm updated
upd data
Permission denied (publickey,keyboard-interactive).
fatal: The remote end hung up unexpectedly
data updated

How can I to fix it?

4

The problem is you are trying to update from github which requires an ssh key. Either create a dedicated ssh key without a password on your server and add it to your github account or use the http-readonly uri to update your repository:

git pull --mirror https://github.com/account/repository.git
  • How can I to create this key? – Guy Fawkes Jun 16 '12 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.