2012-08-07 77 views
3

之前我的問題,TortoiseSVN Can't Connect已解決,我遇到了一個新問題。 在託管我的svn存儲庫的linux服務器上,在存儲庫的目錄中有一個conf/svnserve.conf文件。在這個文件中,我可以選擇:TortoiseSVN無法驗證

anon-access = none | read | write 

最初,這條線被註釋掉,默認值必須一直read。 當然,我想設置anon-access = none,我想auth-access = write(這是默認值)。

但是,當我設置anon-access = none,當我嘗試使用URL svn://host:port/repositorynameTortoiseSVN的版本庫瀏覽器 瀏覽,我得到的錯誤:

Unable to connect to a repository at URL 'svn://host:port/repositoryname' No access allowed to this repository

我想如果可能的話沒有成功驗證的ssh,因爲我收集ssh有更多的移動部分,可能會慢一點。

服務器是CloudLinux服務器版本5.8

的SVN服務器信息如下。到目前爲止,我只嘗試過svn協議。

svn, version 1.6.17 (r1128011) compiled Jul 26 2012, 03:59:19

Copyright (C) 2000-2009 CollabNet. Subversion is open source software, see http://subversion.apache.org/ This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

  • ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
    • handles 'http' scheme
  • ra_svn : Module for accessing a repository using the svn network protocol.
    • with Cyrus SASL authentication
    • handles 'svn' scheme
  • ra_local : Module for accessing a repository on local disk.
    • handles 'file' scheme
  • ra_serf : Module for accessing a repository via WebDAV protocol using serf.
    • handles 'http' scheme
    • handles 'https' scheme

我希望這是一個很好的問題,因爲這是種的「開箱即用」的行爲連接的窗戶,當有人將svn涉及到一個共享的託管帳戶,這可能是很常見的svn的。

謝謝!

回答

2

設置這些線在你的文件svnserve.conf:

19 anon-access = none 
20 auth-access = write 
    [...] 
27 password-db = passwd 
    [...] 
39 realm = Name-of-your-repository 
46 force-username-case = lower 

行號是近似的。

realm應該等於您的存儲庫的名稱。它可以是任何東西。 password-db是誰有權使用存儲庫。默認情況下,該行被NOPed。

接下來,您將編輯位於同一目錄中的passwd文件。格式非常簡單:

<userName> = <password> 

有兩個NOPed條目告訴你它是如何完成的。

+0

謝謝!有效!我沒有找到「force-username-case」這一行,但這並不影響結果。在那時,當我進入** TortoiseSVN Repository Browser **時,它促使我進行身份驗證,並且有一個複選框來保存登錄信息,因此我不必再重複登錄。 ** Visual Studio 2010 **中的VisualSVN **也適用。這很簡單,但由於某種原因我很難找到。 – toddmo 2012-08-07 21:22:33