README-windows.txt
author Tom Parker <palfrey@lshift.net>
Tue, 03 Apr 2012 17:35:02 +0100
branchwindows
changeset 348 b155c43eaa56
parent 347 windows.txt@301479a4acdf
child 349 b271be84da5e
permissions -rw-r--r--
Update windows guide and fix a couple of minor items in the Makefile
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
348
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
     1
Windows setup for mercurial-server
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
     2
==================================
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
     3
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
     4
WARNING: Windows is *not* a supported system. We've gotten this guide to work ok
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
     5
but the permissions are still broken in various ways to do with the underlying
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
     6
issues in Windows' permissions system. Unix-based systems, especially Debian and
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
     7
derivatives are still the main target. Patches to this guide to improve the
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
     8
support are welcome however!
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
     9
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    10
1) Install Cygwin (http://cygwin.com/) using the setup.exe from there. Tested
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    11
against 1.7.12-1, may work with earlier versions. You'll need the base install
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    12
plus the following additional packages:
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    13
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    14
- docbook-xsl
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    15
- libxslt
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    16
- make
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    17
- mercurial
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    18
- openssh
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    19
- python
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    20
  
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    21
Note that even if you've already got them installed in Windows, Python and
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    22
Mercurial still need to be installed in Cygwin.
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    23
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    24
2) Open a new Cygwin terminal as Adminstrator (right click on "Cygwin Terminal"
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    25
start menu option and pick "Run as administrator")
347
301479a4acdf Initial notes and work towards a Windows install
Tom Parker<palfrey@lshift.net>
parents:
diff changeset
    26
348
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    27
3) Run "ssh-host-config -y" and "cygrunsrv -S sshd" to get sshd running. We need
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    28
this because there's no proper su in Cygwin (see
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    29
http://cygwin.com/faq-nochunks.html#faq.using.su for why this is)
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    30
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    31
3) Goto the mercurial-server folder and "make setup-windows"
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    32
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    33
4) Run "passwd hg" and set the password for the hg user. 
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    34
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    35
5) Following the example from the main mercurial-server documentation (in that the server
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    36
is called 'jeeves', your username is 'jay' and the client is called 'spoon'),
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    37
but with a few differences for Cygwin, we can now get you initial access. We
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    38
assume that you've generated a key with PuTTYgen
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    39
(http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) and then
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    40
copied the contents of the "public key" box into a file called my-key.
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    41
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    42
jay@jeeves:~$ mkdir -p /etc/mercurial-server/keys/root/jay
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    43
jay@jeeves:~$ cp my-key /etc/mercurial-server/keys/root/jay/spoon
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    44
jay@jeeves:~$ chown hg /etc/mercurial-server/keys/root/jay/spoon
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    45
jay@jeeves:~$ ssh hg@localhost /usr/share/mercurial-server/refresh-auth
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    46
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    47
The rest of the instructions in the normal mercurial-server documentation should
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    48
now work. Note that although it's possible to add keys/access info to
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    49
/etc/mercurial-server it's much easier to do things via the hgadmin repository,
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    50
and doing things via /etc should probably be limited to only if you mess up the
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    51
setup in hgadmin.
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    52
b155c43eaa56 Update windows guide and fix a couple of minor items in the Makefile
Tom Parker <palfrey@lshift.net>
parents: 347
diff changeset
    53
# vim: tw=80 fo=cqt wm=0