Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
linux:subversion:creer_un_depot_svn [2022/09/03 17:13] – créée tutospisto | linux:subversion:creer_un_depot_svn [2025/04/12 15:03] (Version actuelle) – tutospisto | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
# authz = / | # authz = / | ||
# svn.passwd = / | # svn.passwd = / | ||
- | # svnserve = / | + | # svnserve = / |
- | # Creation | + | Création |
- | svnadmin create / | + | <code bash>svnadmin create / |
- | # On edite sa configuration | + | |
- | nano / | + | On édite |
- | # On cree six utilisateurs pour faire des tests sur les permissions (pour le premier, on utilise l' | + | <code bash>nano / |
+ | |||
+ | <code bash svnserve.conf[enable_line_numbers=1, | ||
+ | ### This file controls the configuration of the svnserve daemon, if you | ||
+ | ### use it to allow access to this repository. | ||
+ | ### access through http: and/or file: URLs, then this file is | ||
+ | ### irrelevant.) | ||
+ | |||
+ | ### Visit http:// | ||
+ | |||
+ | [general] | ||
+ | ### These options control access to the repository for unauthenticated | ||
+ | ### and authenticated users. | ||
+ | ### and " | ||
+ | anon-access = none | ||
+ | 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 = svn.passwd | ||
+ | ### The authz-db option controls the location of the authorization | ||
+ | ### rules for path-based access control. | ||
+ | ### 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. | ||
+ | ### is repository' | ||
+ | realm = TITRE_DE_TON_DEPOT | ||
+ | |||
+ | [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 ' | ||
+ | ### 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 | ||
+ | |||
+ | </ | ||
+ | |||
+ | On crée six utilisateurs pour faire des tests sur les permissions (pour le premier, on utilise l' | ||
+ | |||
+ | <code bash> | ||
htpasswd -cm / | htpasswd -cm / | ||
htpasswd -m / | htpasswd -m / | ||
Ligne 17: | Ligne 72: | ||
htpasswd -m / | htpasswd -m / | ||
htpasswd -m / | htpasswd -m / | ||
- | # On configure les permissions du depot (! fichier d' | + | </ |
- | nano /var/svn/mon_depot/ | + | |
- | # On configure le Path (chemin) du depot et on indique quels sont les fichiers authz et passwd | + | On configure les permissions du dépôt : |
- | nano / | + | <code bash>nano /var/svn/TON_DEPOT/conf/authz</ |
- | # On donne recursivement acces a tout les depots | + | |
- | chown -R svn: /var/svn | + | |
- | # On donne les droits | + | <code bash authz[enable_line_numbers=1, |
- | chown -R www-data: | + | ### This file is an example authorization file for svnserve. |
- | # Le tout en une seule commande : | + | ### Its format is identical to that of mod_authz_svn authorization |
- | chown -R svn: /var/svn && chown -R www-data: | + | ### files. |
- | # On redemarre | + | ### 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 ' | ||
+ | ### - only anonymous users, using the ' | ||
+ | ### - anyone, using the ' | ||
+ | ### | ||
+ | ### A match can be inverted by prefixing the rule with ' | ||
+ | ### grant read (' | ||
+ | ### ('' | ||
+ | |||
+ | [aliases] | ||
+ | # joe = / | ||
+ | |||
+ | [groups] | ||
+ | # harry_and_sally = harry, | ||
+ | # harry_sally_and_joe = harry, | ||
+ | |||
+ | # [/ | ||
+ | # harry = rw | ||
+ | # &joe = r | ||
+ | # * = | ||
+ | |||
+ | # [repository:/ | ||
+ | # @harry_and_sally = rw | ||
+ | # * = r | ||
+ | |||
+ | [/] | ||
+ | admin1 = rw | ||
+ | |||
+ | [/ | ||
+ | visiteur1 = r | ||
+ | admin2 = rw | ||
+ | dev1 = rw | ||
+ | |||
+ | [/ | ||
+ | utilisateur42 = rw | ||
+ | </ | ||
+ | |||
+ | |||
+ | On configure le Path (chemin) du dépôt | ||
+ | |||
+ | <code bash>nano / | ||
+ | |||
+ | On ajoute : | ||
+ | <code bash> | ||
+ | < | ||
+ | DAV svn | ||
+ | SVNPath / | ||
+ | AuthType Basic | ||
+ | AuthName " | ||
+ | AuthUserFile / | ||
+ | |||
+ | AuthzSVNAccessFile / | ||
+ | Require valid-user | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On donne récursivement accès | ||
+ | |||
+ | <code bash>chown -R svn: /var/svn</ | ||
+ | On donne les droits | ||
+ | |||
+ | <code bash>chown -R www-data: | ||
+ | |||
+ | Le tout en une seule commande : | ||
+ | <code bash>chown -R svn: /var/svn && chown -R www-data: | ||
+ | |||
+ | On redémarre | ||
+ | <code bash>/ | ||
+ | |||
+ | Le dépôt est accessibles sur : http://TONDOMAINE/svn_TONDEPOT | ||
- | A VOIR : http:// | + | Pour se servir de SVN sur windows avec TortoiseSVN |
+ | {{ :linux:subversion: |