SVN創建資源庫和遠程連接配置


本機安裝的是TortoiseSVN-1.7.5.22551-win32-svn-1.7.3.msi

安裝好后會在鼠標右鍵中出現如圖最后兩項的選項:

創建svn資源庫:

1.首先是創建一個資源庫文件夾,本例是sevenStar

如圖:

2.在創建的文件夾sevenStar上右鍵,選擇TortoiseSVN—>Create repository here選項

如圖:

此時會出現一個對話框,如圖:

 

 
@1 選擇第一個按鈕Create folder structure,會在sevenStar文件夾中創建svn所需要的默認的目錄結構
創建成功會彈出如圖的對話框:
 
 
創建成功之后確定即可
@2 選擇第二個按鈕Start Repobrowser,會瀏覽到本資源庫的目錄結構,同時可以設置遠程訪問資源庫鏈接(URL):svn://192.168.1.12/sevenStar,
以備在eclipse中下載上傳
如圖:
單擊OK按鈕即可設置好
 
3. 查看本資源庫的設置是否成功
在sevenStar文件夾上右鍵,選擇Check out...
如圖:
就會彈出一個Checkout對話框
如圖:
最上面的URL of repository:中的地址:svn://192.168.1.12/sevenStar就是我們剛才設置的
 
4.對本資源庫進行配置
打開sevenStar文件夾有如圖的目錄結構:
打開配置文件夾conf,有authz,passwd,svnserve.conf三個文件
如圖:
@1 打開authz文件修改:
在[groups]下添加sevenStar資源庫對用戶的訪問權限
 
[groups]
[sevenStar:/]
* = rw
 
上面配置說明sevenStar資源庫對所有用戶具有讀寫訪問權限
@2 打開passwd文件修改:
在本文件中[users]下添加用戶和密碼,格式是:用戶 = 密碼
 
[users]
# harry = harryssecret
# sally = sallyssecret
dev=dev
wbd=wbd
如上,添加了dev用戶,密碼為dev
添加了wbd用戶,密碼為wbd
@3 打開svnserve.conf文件修改:
在本文件中進行訪問權限設置
在[general]下把
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = My first repository
幾項前的注釋(#)去掉即可
 
[general]
### The anon-access and auth-access options control access to the
### repository for unauthenticated (a.k.a. anonymous) users and
### authenticated users, respectively.
### Valid values are "write", "read", and "none".
### Setting the value to "none" prohibits both reading and writing;
### "read" allows read-only access, and "write" allows complete
### read/write access to the repository.
### The sample settings below are the defaults and specify that anonymous
### users have read-only access to the repository, while authenticated
### users have read and write access to the repository.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file.  If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
realm = My First Repository
### The force-username-case option causes svnserve to case-normalize
### usernames before comparing them against the authorization rules in the
### authz-db file configured above.  Valid values are "upper" (to upper-
### case the usernames), "lower" (to lowercase the usernames), and
### "none" (to compare usernames as-is without case conversion, which
### is the default behavior).
# force-username-case = none
 
以上就是在svn服務器端創建sevenStar資源庫的詳細步驟
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM