[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Post Commit Hook Script !!

From: Himanshu Raina <raina_himanshu_at_yahoo.com>
Date: Fri, 29 Jul 2011 14:38:59 +0530 (IST)

Okay what I meant by null keys was password less keys. Apache runs as svn user and the repository permissions are as follows
drwxr-xr-x 7 svn apache 4096 Jul 27 12:14 Project/
The hooks script also has 755 permission and ownership as mentioned above. The hook script when run from the svn server works absolutely fine.
svnserver hook script --> 172.16.3.2 (deployment server) ----> 172.16.3.3 (destination server)
  * executing `deploy:php'  * executing `deploy:php:update_code'    executing locally: "svn info http://mydomain.com/usr/local/svn/Project/Code1  -rHEAD"  * executing "svn export --force -q  -r167 http://mydomain.com/usr/local/svn/Project/Code1/apps/Project/releases/20110729085852 && (echo 167 > /apps/Project/releases/20110729085852/REVISION)"    servers: ["172.16.3.3"]    [root@172.16.3.3] executing command    command finished  * executing `deploy:php:finalize_update'  * executing "chmod -R g+w /apps/Project/releases/20110729085852"    servers: ["172.16.3.3"]    [root@172.16.3.3] executing command    command finished  * executing `deploy:php:symlink'  * executing "rm -f /apps/Raina/current && ln -s /apps/Project/releases/20110729085852 /apps/Project/current"    servers: ["172.16.3.3"]    [root@172.16.3.3] executing command    command finished

Could you please help in this regard ? The hook when invoked gives Host Authentication Error whereas it shouldn't
Regards,Himanshu Raina
--- On Fri, 29/7/11, Ryan Schmidt <subversion-2011a_at_ryandesign.com> wrote:

From: Ryan Schmidt <subversion-2011a_at_ryandesign.com>
Subject: Re: Post Commit Hook Script !!
To: "Himanshu Raina" <raina_himanshu_at_yahoo.com>
Cc: users_at_subversion.apache.org, "MarkCooke" <mark.cooke_at_siemens.com>
Date: Friday, 29 July, 2011, 2:13 PM

On Jul 29, 2011, at 03:38, Himanshu Raina wrote:

> Well the interactive part has been removed. Moreover, there exists null keys between the servers so it won't prompt for password. The current issue that I'm facing is that it gives the following error on execution
>
> Warning: post-commit hook failed (exit code 255) with output:
> + /usr/bin/ssh -l root 192.168.2.60 'cd /deploy/Project/config; /usr/bin/cap deploy:php tagid=Code1'
> Host key verification failed.
>
> The deployment script has an environment variable set which takes the tagid as specified in the command line. The set is as follow
>
> From my machine I do commit, the changes are updated in the repository on svn server. The hook script gets invoked and connects to another server where deployments scripts are available and the script in turn connects to different destination servers. The entire process uses SSH and I am using null keys for the time being.

I don't know what "null key" means. But from the error you've shown, it sure sounds like the hook script is unable to connect to your other server via this ssh command. Again, ensure the requisite keys are in the correct user's .ssh directory. Earlier you showed things owned by the svn user and the apache group. If apache is running as the user svn, then ensure the required ssh keys are in the svn user's .ssh directory on the subversion server.
Received on 2011-07-29 11:09:54 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.