[Python-checkins] CVS: python/nondist/sf-html winssh.txt,NONE,1.1 sf-faq.html,1.14,1.15
Tim Peters
python-dev@python.org
Fri, 25 Aug 2000 00:55:51 -0700
Update of /cvsroot/python/python/nondist/sf-html
In directory slayer.i.sourceforge.net:/tmp/cvs-serv30751
Modified Files:
sf-faq.html
Added Files:
winssh.txt
Log Message:
Replaced the Windows cmdline CVS/SSH instructions with Andy Robinson's --
which work great.
--- NEW FILE ---
Setting up a cmdline CVS to work with SourceForge under Windows
---------------------------------------------------------------
28-Jun-2000 Original by Andy Robinson (andy@reportlab.com)
03-Jul-2000 Modified by Tim Peters (tim_one@msn.com)
16-Aug-2000 Modified by Riaan Booysen (riaan@e.co.za)
25-Aug-2000 Modified by Tim Peters (tim_one@msn.com)
1. Get
ftp.reportlab.com/tools/cvs-1.10-win.zip
ftp.reportlab.com/tools/ssh-1.2.14-win32bin.zip
(copied from somewhere obscure for safety, I forget where)
2. Unzip these to a location on your path. Type 'cvs' and 'ssh' from
somewhere else to verify.
3. Choose where to keep your CVS projects; let's assume
C:\Code
4. Create a subdirectory C:\Code\.ssh (yes, dot-ssh)
5. (see #8 for an alternative) Create two environment variables:
HOME=C:\Code
CVS_RSH=ssh
HOME must point to the directory above your .ssh directory.
On Win9x, this can be done in a batch file or autoexec.bat; e.g.,
set HOME=c:\Code
set CVS_RSH=ssh
Run the batch file, or reboot if you're using autoexec.bat. On NT or 2000,
go to Control Panel | System | Environment and set them at either user or
machine level.
6. If not done so, get a Sourceforge account and a project you can log in
to.
7. OPTIONAL (& if you skip this now, you can do it later if you change your
mind).
If you want to avoid typing in your SourceForge password before every CVS
operation, generate the ssh public and private identity keys like this:
ssh-keygen -C $KEY -f C:\Code\.ssh\identity
where $KEY is just some identifier (like your name or email address; this
is not used for authentication, it's just stored in the public identity
file as a reminder to you why you created this key). Note that you must
use -f! ssh-keygen fails to work without it on Windows.
When asked for a passphrase, security experts will tell you to choose a
long and hard-to-guess string. But then you have to type *that* all the
time instead of your SourceForge password. If you just hit ENTER (leave
the passphrase empty), you won't be bothered with SourceForge passwords or
ssh passphrases again. This is a security tradeoff only you can make. If
in doubt, ChOOzAl0Ng&HaRDtoGUessSTr1Ng.
ssh-keygen creates two files under .ssh\:
identity
This is your private key, and is a binary file.
NEVER reveal it to anyone. Do NOT share your .ssh directory across
a network either. The scheme is only as secure as this file.
identity.pub
This is your public key, a text file, full of lots of digits and
the mnemonic $KEY you gave to ssh-keygen. This file can be shared
freely, and indeed must be shared for the scheme to be of any use.
On your SourceForge account page, in the 'Shell Account Information'
section click the [Edit Keys] link.
Copy/paste the contents of the generated identity.pub file as one line into
the Authorized Keys text box.
After the next cron job (max 6 hours) your information should be updated.
8. Teach SSH about your project's home, by doing
ssh -l $USERNAME $MYPROJECT.sourceforge.net
where $USERNAME is your SourceForge login name and $MYPROJECT your
SourceForge project name. You'll see
Host "$MYPROJECT.sourceforge.net" added to the list of known hosts.
and then
Creating random seed file ~/.ssh/random_seed
This may take a while. After a while it will prompt for a password. Type
your SourceForge password and hit ENTER. After some SourceForge msgs
scroll by, you'll be left at a SourceForge shell prompt. Type
exit
and hit ENTER. Now you're back at the DOS prompt.
9. You will need either a lengthy command line or a batch file for each
sourceforge project. I set cvsroot in a batch file in my 'c:\code'
directory, and have one such file for each CVS project I use (about ten of
them!):
set CVSROOT=:ext:$USERNAME@cvs.$MYPROJECT.sourceforge.net:/cvsroot/$DIRNAME
where $USERNAME and $MYPROJECT are again your SourceForge login and project
names, and $DIRNAME is the top-level directory in the SourceForge CVS tree;
a project can have several, but usually there is just one. Note: you can
keep HOME and CVS_RSH out of your permanent environment (see #5) by adding
those definitions to this batch file instead.
10. Execute this batch file. You can now go to C:\Code and do
cvs -z7 checkout $MYPROJECT
(z7 means 'compress network traffic', handy over dialup lines)
11. From now on, just use CVS normally, running this batch file first each
time you bring up a DOS box you're going to use for CVS work. Note: If
you did not follow step 7, you'll be asked for your password each time you
enter a CVS command.
I wouldn't survive without Karl Fogel's book "Open Source Development with
CVS", Coriolis Press. The CVS reference material (about 225 printed
pages!) from this book is available for free download from
http://cvsbook.red-bean.com/
Footnote: for anonymous checkout, I think you just omit the 'my_user_name@'
part from the CVSROOT variable.
I hope this helps; let me know if people have any problems with the
instructions.
-
Andy Robinson
ReportLab
Index: sf-faq.html
===================================================================
RCS file: /cvsroot/python/python/nondist/sf-html/sf-faq.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** sf-faq.html 2000/08/23 04:24:58 1.14
--- sf-faq.html 2000/08/25 07:55:48 1.15
***************
*** 47,52 ****
<h2><a href="#windows">4. Windows</a></h2>
<ol>
! <li><a href="#w1">How to install ssh?</a></li>
! <li><a href="#w2">How to install cvs to use ssh?</a></li>
</ol>
--- 47,51 ----
<h2><a href="#windows">4. Windows</a></h2>
<ol>
! <li><a href="#w1">How to install cvs and ssh?</a></li>
</ol>
***************
*** 420,476 ****
<h3><a name="w1" id="w1"></a>4.1.:</h3>
! <h4>Q: How to install ssh?</h4>
<h4>A:</h4>
! Download the following file and unzip it to <tt>C:\BIN</tt>:
!
! <blockquote>
! <tt><a
! href="ftp://ftp.cs.hut.fi/pub/ssh/contrib/ssh-1.2.14-win32bin.zip">ftp://ftp.cs.hut.fi/pub/ssh/contrib/ssh-1.2.14-win32bin.zip</a></tt></blockquote>
! Create a home directory (e.g. <tt>C:\HOME\SF_USERNAME</tt>) and
! <tt>C:\ETC</tt> and place a <tt>passwd</tt> file in <tt>C:\ETC</tt>:
!
! <blockquote>
! <tt>mkdir C:\HOME</tt><br />
! <tt>mkdir C:\HOME\SF_USERNAME</tt><br />
! <tt>mkdir C:\ETC</tt><br />
! <tt>echo sf_username:x:1:10:Name,
! Real:/home/sf_username:/windows/command.com >
! C:\ETC\passwd</tt></blockquote>
! Add the following entries to your environment. This can be automated e.g. by
! putting them into <tt>AUTOEXEC.BAT</tt> on Win9x.
!
! <blockquote>
! <tt>SET PATH=%PATH%;C:\BIN</tt><br />
! <tt>SET HOME=\HOME\SF_USERNAME</tt><br />
! <tt>SET HOMEPATH=\HOME\SF_USERNAME</tt><br />
! <tt>SET HOMEDRIVE=C:</tt><br />
! <tt>SET USERNAME=sf_username</tt></blockquote>
! After the environment is updated you should be able to use ssh. Try this:
!
! <blockquote>
! <tt>ssh -l sf_username shell.sourceforge.net</tt></blockquote>
!
! <h3><a name="w2" id="w2"></a>4.2.:</h3>
!
! <h4>Q: How to install cvs to use ssh?</h4>
!
! <h4>A:</h4>
! Download the following file and unzip it to <tt>C:\BIN</tt>:
!
! <blockquote>
! <tt><a
! href="ftp://download.cyclic.com/pub/cvs-1.10/windows/cvs-1.10-win.zip">ftp://download.cyclic.com/pub/cvs-1.10/windows/cvs-1.10-win.zip</a></tt></blockquote>
! Add the following entries to your environment. This can be automated e.g. by
! putting them into <tt>AUTOEXEC.BAT</tt> on Win9x.
!
! <blockquote>
! <tt>SET CVS_RSH=ssh</tt><br />
! <tt>SET
! CVSROOT=:ext:sf_username@cvs.python.sourceforge.net:/cvsroot/python</tt></blockquote>
! After the environment is updated you should be able to use cvs/ssh: Try this:
!
! <blockquote>
! <tt>cvs co python</tt></blockquote>
<h1><a name="macintosh" id="macintosh"></a>5. Macintosh</h1>
--- 419,431 ----
<h3><a name="w1" id="w1"></a>4.1.:</h3>
! <h4>Q: How to install cvs and ssh</h4>
<h4>A:</h4>
! <a href="winssh.txt">Here's a link</a> to text instructions for
! setting up a cmdline CVS using SSH under Windows,
! originally developed by Andy Robinson.
! Tim Peters is too lazy to change it into HTML every time it's updated.
! All the Windows folks at Reportlab and PythonLabs swear by this scheme --
! and all the others we've tried are broken.
<h1><a name="macintosh" id="macintosh"></a>5. Macintosh</h1>