Page History
Git on Windows
(from drupal 1434 (backup) 1434 (public))Install Git
Install Git for Windows from http://code.google.com/p/msysgit/. Note you just want to grab Git, not msysGit.
When you clone a repository, you will want to use the following syntax: git clone ssh://tannenba@chevre.cs.wisc.edu/p/condor/repository/CONDOR_SRC.git
Since Git includes an ssh.exe in its bin/ directory, you should be good to go -- but you will have to enter your ssh password whenever you git clone/pull/push/fetch, or otherwise do comparisons against the origin. If you want to set things up so you do not have to enter your password each time, read on.
Setup to use Git without passwords like Todd does
- Download plink.exe (google it). This is a nice, free, full-featured command link ssh client for Win32. TJ found it here
- Grab puttygen.exe (google it) and use it to create a public/private keypair and add the public key into your authorized keys as instructed here. Or here. Don't protect your private key with a passphrase; instead, store your keys on your Windows machine in ~/.ssh2 (or wherever) and right select on that folder. Then (at least on XP), click on the Advanced button near the folder Attributes and place a check mark next to Encrypt contents to secure data.
- Logon to whichever machine you ssh into and run the following commands.
fs setacl ~/.ssh/ system:anyuser rl stashticket
runauth
can use it - Test that you can now ssh w/o a password by entering something like:
plink.exe -2 -C -i c:\home\tannenba\.ssh2\putty.ppk %1 "/bin/date"
- Now set the GIT_SSH environment variable to be
gitssh.bat
, which is provided below. This batch file will rewrite that command git wants to run so thatrunauth
is used (to get an AFS token) and also so that the correct version of Git in /unsup/git is used.@c:\utils\sshcvs\plink.exe -2 -C -i c:\home\tannenba\.ssh2\putty.ppk %1 "/s/std/bin/runauth /unsup/git/bin/%~2"
- You will need to run
stashticket
once a month on whatever machine you ssh into.
Attachments:
- DOS2UNIX.EXE 40960 bytes added by tannenba on 2010-Oct-06 15:37:04 UTC.
a windows command-line utility to convert a source file from dos style line endings to unix style.