2010-11-03 133 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