多谢作者提供这篇文章,解决我了一个大问题。
文章转自:http://www.codeios.com/thread-139997-1-1.html
- svn import /Users/gaohf/projects/demo/ svn://localhost/svn/repository/demo --username gaohf --password 123456 -m "Initial import"
Mac自带了svn服务端和客户端,所以只需要简单配置一下就可以使用。
1、创建svn repository
- svnadmin create /Users/gaohf/svn/repository
2、配置svn用户权限/Users/gaohf/svn/repository/conf/目录下存在3个文件:authz、passwd、svnserve.conf
authz,内容如下:
- ### This file is an example authorization file for svnserve.
- ### Its format is identical to that of mod_authz_svn authorization
- ### files.
- ### As shown below each section defines authorizations for the path and
- ### (optional) repository specified by the section name.
- ### The authorizations follow. An authorization line can refer to:
- ### - a single user,
- ### - a group of users defined in a special [groups] section,
- ### - an alias defined in a special [aliases] section,
- ### - all authenticated users, using the '$authenticated' token,
- ### - only anonymous users, using the '$anonymous' token,
- ### - anyone, using the '*' wildcard.
- ###
- ### A match can be inverted by prefixing the rule with '~'. Rules can
- ### grant read ('r') access, read-write ('rw') access, or no access
- ### ('').
- [aliases]
- # joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
- [groups]
- test_group = test
- # harry_sally_and_joe = harry,sally,&joe
- [/]
- test=rw
- # &joe = r
- * =
- # [repository:/baz/fuz]
- # @harry_and_sally = rw
- # * = r
注意: 这里面是授权
里面的[/] 不能掉
passwd,内容如下:
- ### This file is an example password file for svnserve.
- ### Its format is similar to that of svnserve.conf. As shown in the
- ### example below it contains one section labelled [users].
- ### The name and password for each user follow, one account per line.
- [users]
- test=123456
svnserve.conf,内容如下:
- ### This file controls the configuration of the svnserve daemon, if you
- ### use it to allow access to this repository. (If you only allow
- ### access through http: and/or file: URLs, then this file is
- ### irrelevant.)
- ### Visit http://subversion.tigris.org/ for more information.
- [general]
- ### These options control access to the repository for unauthenticated
- ### and authenticated users. Valid values are "write", "read",
- ### and "none". The sample settings below are the defaults.
- 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
- [sasl]
- ### This option specifies whether you want to use the Cyrus SASL
- ### library for authentication. Default is false.
- ### This section will be ignored if svnserve is not built with Cyrus
- ### SASL support; to check, run 'svnserve --version' and look for a line
- ### reading 'Cyrus SASL authentication is available.'
- # use-sasl = true
- ### These options specify the desired strength of the security layer
- ### that you want SASL to provide. 0 means no encryption, 1 means
- ### integrity-checking only, values larger than 1 are correlated
- ### to the effective key length for encryption (e.g. 128 means 128-bit
- ### encryption). The values below are the defaults.
- # min-encryption = 0
- # max-encryption = 256
3、启动服务器
- svnserve -d -r /Users/gaohf/svn/repository
没有任何提示就说明启动成功了。
4、将项目导入svn库
- svn import /Users/gaohf/projects/demo/ svn://localhost/svn/repository/demo --username gaohf --password 123456 -m "Initial import"
5、签出项目
- svn checkout svn://127.0.0.1/svn/repository/demo --username=test--password=123456
相关推荐
Mac下搭建svn服务器教程 详细讲解了Mac下搭建svn服务器
centos 7.9服务器 离线 搭建svn服务器 ,该文章适用于 开发人员 实施人员 项目经理用于项目文档管理 代码管理,而不指定如何在centos7.9环境下离线搭建svn服务器,因为大多数的网站只是介绍yum install 的方式,但是...
Linux下搭建SVN服务器,绝对可以成功搭建
对初学者来说SVN的配置在windows下是非常的苦难的,这个帮助文档将会非常方便的给大家一个搭建svn的方便的方法。
linux下搭建SVN服务器完全手册,完全配置详解
文档中完成的介绍了再linux下如何搭建一个svn服务,以及如何创建svn用户、权限、项目等信息
本篇文章主要介绍了Mac环境下搭建svn环境的使用方法。由于Mac自带了svn的服务器端和客户端功能,所以我们可以在不装任何第三方软件的前提下使用svn功能,只需要简单配置,有兴趣的可以了解一下。
windows环境下搭建svn环境以用代码同步提交。此文档为自己搭建环境时笔记,有步骤截图。完全可用。
该文档详细描述了如何在windows平台下搭建svn服务器,以及在搭建过程中可能遇到的问题,对于可能出现的问题,给出了解决方法。
在centos linux环境下快速搭建SVN服务器环境的文档教程
详细介绍如何在linux下配置svn,很不错的说。
linux 搭建svn 直接根据我这个就能搭建好完全能使用 linux 搭建svn 直接根据我这个就能搭建好完全能使用 linux 搭建svn 直接根据我这个就能搭建好完全能使用 linux 搭建svn 直接根据我这个就能搭建好完全能使用 ...
CentOS 7搭建SVN服务器,详细安装步骤说明及配置详细步骤说明
阿里云搭建SVN服务器
Ubuntu上搭建SVN服务器详细步骤。 目 录 1 概述 1 2 安装Ubuntu 9.10服务器 1 3 安装Apache服务器 1 4 创建SVN服务器 1 4.1 安装SVN 1 4.2 增加组 2 4.3 创建SVN仓库 2 4.4 配置Apache服务器 2 5 配置SSL 3 6 远程...
搭建svn服务器和配置svn服务
在windows下搭建SVN服务器,通过实例一步一步的教会你如何搭建SVN服务器,有操作截图哟,并且还有错误示例以及解决办法,哈哈,希望我走过的弯路你不要再走了,哈哈哈,希望能帮到你...
1.1 、安装教程 svn Windows下搭建SVN服务器1