Question

I am trying to update a remote server's repository using ssh from a shell script via svn post-commit hook. What I did was,

  • Wrote a shell script to ssh to the server and update the repository
  • Added a line to execute the above script on post-commit

Everything works fine when I run the script manually. But when I make a commit I am getting the below error:

Sending        test.py
Transmitting file data .
Committed revision 47.
Warning: post-commit hook failed (exit code 6) with output:

I tried googling out but can't find any thing related to error code 6.Any help is appreciated.

Was it helpful?

Solution 2

The actual solution was, I removed the post-commit.tmpl file and somehow, it works now.

OTHER TIPS

You see that kind of exit code in programs like ovm-ctl:

.ssh exits with non-zero code (generic error): Return exit code 5
.ssh exits with code 255 (connection or protocol error): Return exit code 6'

As mentioned in this thread, check first if a simple ssh works:

ssh user@<ip> 
ssh -Tvvv user@<ip> 

Then check which user account is actually executing that svn hook, with which environment variable.

The same thread mentioned the following solution (but it could be very different in your case)

cat ~/.ssh/config
Host *
StrictHostKeyChecking no

Change permission to 600 for this file. Now this is working fine.

In your case, it could be a different issue though (like a process issue, even though that was for Git, not SVN)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top