Autor | Frank Steinberg |
Schlüsselworte | Revision Control, RCS, SVN, CVS |
Kategorien | Software |
THIS PAGE IS OUTDATED. Please read the articles on Subversion or use our GitLab-Server. For almost all projects, no matter whether pure software development or the creation of a document, it is very reasonable to use some kind of revision control. Commonly used revision control systems are RCS (revision control system), CVS (concurrent versions system), and SVN ("Subversion"). This is not the place to discuss these in detail. Use books, manual pages, or online tutorials on the Web to learn more about them. These three tools are installed on all common IBR Linux systems, usually as parts of installed Debian GNU/Linux packages. To give a short advice on which one is the best for your task: Maybe, RCS for single files. Maybe, SVN for "projects". Maybe, CVS if SVN cannot be used for obscure technical reasons. How to use RCSThere is not much to say about RCS. Its two most important tools ci and co can be used as usual. Note that RCS follows a "pessimistic" approach, which means only one person can have a lock on a file and is able to edit it, while other approaches to edit it are denied. So you should release your locks immediately after your changes. There are manual pages available on all RCS tools. How to use CVSCVS is used for many projects. It support multiple methods to access a repository. Note that at IBR we do not support the "pserver" method on a central CVS server, since there have been many security problems with this protocol in the past and there are better choices these days. However, if you prefer to use CVS, you can setup your own repository in your home directory (and make it also accessible to other users, if you wish). You can also use SSH and the ":ext:" access method to access it from remote sites. It's all documented in the CVS info pages. How to use SVN (Subversion)Subversion is in some way the successor of CVS. It uses the HTTP (and HTTPS) protocol to access remote repositories. IBR supports a central Subversion repository which is used for many projects (software, papers, etc.). A common scheme is to support http://www.ibr.cs.tu-bs.de/svn/project for anonymous read-only access for open source projects, and https://www.ibr.cs.tu-bs.de/svn/project for authors' read/write access to the same repository. There is a lot of documentation on the web. Since Subversion supports only a central auhorization file to configure access rules to different paths within the repository, we have a special way to allow Subversion users to configure their own access rules: Whenever a directory contains a file named # only project members may write files steinb = rw timm = rw # other staff members can only read files @mitarb = r # others and anonymous svn users cannot read anything * = [.svnaccess] # only one user can configure access control # others cannot even read/checkout the .svnaccess file steinb = rw * = Notes
GitYou can set up your own Git repository and use it (even shared with multiple users), e.g., through SSH, but there is no central shared Git server due to Git's nature as a distributed revision control system. Dr. Björn Hendriks is a great fan of Git. He is willing to help anyone at IBR in case of questions concerning Git. More information on Git is available at:
git-svnGit-svn is a bidirectional interface to SVN repositories. So, git-svn can be used as a SVN frontend with the additional benefit of local branches and other Git features. Unlike SVN git records the full name and e-mail address of the committer in each commit. To let Attention: Git includes name and mail address in the SHA1 of a commit. So if you plan to have several git repositories exchanging branches as well as fetching from the same SVN repository take care that all apply the same authors-file. Otherwise git will regard SVN-commits fetched from SVN as different commits leading to a mess after pulling offspring branches from other git repositories. Of course, git won't lose any objects but sorting it out could be tedious. Setup a Git Repository on the IBR WebserverNOTE: This approach is not supported "officially" and has some drawbacks. Maybe, it would be better to get a gitosis repository, see below. It is possible to setup a git repo on the IBR webserver such that it is accessible via HTTP for pulling and also for pushing. This is a short tutorial how to do that without additional tools (e.g., gitosis). It gives you full control over the repo and all access rights. In the following commands <name> denotes the name of the repo for HTTP. First the setup described in many git manuals and tutorials about setting up git for HTTP access. See those documentations for details.
This was the general setup from the git manual. Now comes the special IBR part. The problem is that on one hand you (and maybe someone else) must have full access to the repo and on the other hand the webserver needs at least read access. But for security reasons the webserver runs under his own unix user and group and nobody else is member of that group. The problem will be solved by using ACL (access control lists) which extend the common unix access rights for user, group and others. With ACL you can grant additional users and groups access rights. This is how it works for git repos.
To check if all access rights are set correctly you can call If you want to give direct access to the repo to other users replace If you want to further limit the HTTP access to the repo to certain users you can add an gitosisThe approach described above has some drawbacks: It's quite complicated to set up, and it requires users to be able to login to the file server, so that it is limited to IBR staff members. That's why you can also setup a remote repository handled by gitosis on an IBR server:
Please note:
|
Technische Universität Braunschweig
Universitätsplatz 2
38106 Braunschweig
Postfach: 38092 Braunschweig
Telefon: +49 (0) 531 391-0