]> scripts.mit.edu Git - www/raw.git/blob - faq/93.mdwn
Import from TextPattern
[www/raw.git] / faq / 93.mdwn
1 [[!meta title="Can I serve Subversion or Git repositories on scripts.mit.edu?"]]
2 Yes, scripts supports virtual hosting for Subversion and Git
3 repositories.
4
5 ## git autoinstaller
6
7 For git, we now provide an autoinstaller that will create a git
8 repository and set it up for access using git’s smart HTTP
9 transport, the git daemon (read-only), ssh (for locker
10 administrators only), or standard filesystem access. To use the
11 autoinstaller:
12
13     athena% add scripts
14     athena% scripts-git
15
16 To configure write access to your repository, edit the .htaccess
17 file in the \~/web\_scripts/repo folder that was setup. For
18 example, you can
19 [setup client auth](http://scripts.mit.edu/faq/146/how-can-i-avoid-typing-my-password-repeatedly-when-using-git-with-the-smart-http-transport)
20 or you can restrict both read/write access by moving the access
21 control lines outside of the <Files\> block.
22
23 ## Manual setup for Subversion or git
24
25 If you want to use Subversion or set up git by hand, the process is
26 more involved.
27
28 Create a folder named \~/Scripts/git or \~/Scripts/svn:
29
30     athena% add scripts
31     athena% signup-minimal
32     athena% mkdir -p ~/Scripts/git
33     athena% mkdir -p ~/Scripts/svn
34
35 Then either place your repository in that directory or create a
36 symbolic link to your repository:
37
38     athena% ln -s ~/cool-repo.git ~/Scripts/git/
39
40 Make sure that your repository is [readable by scripts](/faq/49),
41 including all its subdirectories. For example, run:
42
43     athena% add consult
44     athena% fsr sa ~/Scripts/svn/repository/ daemon.scripts read
45
46 If you are using git, you need to make sure that your repository is
47 marked as exportable:
48
49     athena% touch ~/Scripts/git/cool-repo.git/git-daemon-export-ok
50
51 Users can checkout the repository using:
52
53     git clone git://lockername.scripts.mit.edu/cool-repo.git
54     svn co svn://lockername.scripts.mit.edu/repo
55
56 scripts currently doesn’t support pushing via the git protocol. The
57 smart HTTP transport will work, though to use that you should read
58 git’s documentation or use our autoinstaller (described above).
59 Subversion does support unencrypted commits, which you can
60 configure with the files in the `conf/` subdirectory of your
61 repository. For this to work, scripts must also have write access
62 to your repository, e.g.:
63
64     athena% athrun consult fsr sa ~/Scripts/svn/repository/ daemon.scripts write
65
66 You will also need to enable password authentication by removing
67 the \# from the start of the “password-db = passwd” line in
68 `~/Scripts/svn/repository/conf/svnserve.conf`, and by adding
69 passwords to `~/Scripts/svn/repository/conf/passwd`.
70
71
72