1. 创建目录 mkdir /home/svn/admin

  2. 生成仓库 svnadmin create /home/svn/admin

  3. cd conf

  4. ll

  5. authz,passwd,svnserve.conf

  6. 设置用户名密码 vi passwd

  7. [users]
    # harry = harryssecret
    # sally = sallyssecret
    yaomy = 12345678

  8. 设置用户权限 vi authz

  9. [groups]
    # harry_and_sally = harry,sally
    # harry_sally_and_joe = harry,sally,&joe
    admin = yaomy
    # [/foo/bar]
    # harry = rw
    # &joe = r
    # * =

    # [repository:/baz/fuz]
    # @harry_and_sally = rw
    # * = r

    [admin:/]
    @admin = rw

  10. vi svnserve.conf

  11. anon-access = none  这个必须要修改成none  否则经常报
    auth-access = write

  12. org.tmatesoft.svn.core.SVNAuthenticationException: svn: E220001: 条目不可读
  13. password-db = passwd

  14. authz-db = authz

  15. realm = /home/svn/admin

  16. 启动svn : svnserve -d -r /home/svn



上述三个配置文件中的属性前面不能有空格,否则连接svn报错 svn: Authentication failed svnserve.conf:12: Option expected