2010-11-03 59 views
0

我试图做一个post-commit脚本,当我推送到服务器的更改时,将更新“分段”(客户端实际上有权访问)。SVN post-commit使用SVN更新另一个目录

但问题是,当后提交叫(我须藤su'ed的svn用户),并得到:

[[email protected]:/]# svn update /home/my-beautiful-home/www 
Authentication realm: <http://svn.my-beautiful-url.com:80> BEAUTIFUL SVN 
Password for 'svn': 

只需提交后所以与崩溃:

Warning: post-commit hook failed (exit code 255) with no output. 

任何想法如何绕过这?有没有办法在命令行中指定用户名和密码?

谢谢!

回答

2

svn help update显示:

Global options: 
    --username ARG   : specify a username ARG 
    --password ARG   : specify a password ARG 
    --no-auth-cache   : do not cache authentication tokens 
    --non-interactive  : do no interactive prompting 
    --trust-server-cert  : accept unknown SSL server certificates without 
          prompting (but only with '--non-interactive') 
+0

OMG。 RTFM给我自己。感谢你!这就实现了:svn update/home/my-path --non-interactive --username MYUSER --password MYPASS ...但是现在我想能够指定比我自己的密码更多的东西,就像一个散列或者什么...你知道这件事吗? – TomShreds 2010-11-03 15:20:10

+0

不,但svn 1.6增加了一些用于安全密码缓存的选项,因此根据您的需要,您可以使用安全密码缓存代替命令行中的指定密码。 http://www.linuxforu.com/previews/subversion-16-security-improvements-illustrated/ – ColinM 2010-11-03 15:35:38