{section: Git on Windows} (from drupal {drupalnode: 1434}) {subsection: 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. {subsection: Setup to use Git without passwords like Todd does} 1: Download plink.exe (google it). This is a nice, free, full-featured command link ssh client for Win32. {link: "http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" TJ found it here} 1: 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 {link: "http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter8.html#puttygen-pastekey" here}. Or {link: "http://www.andremolnar.com/how_to_set_up_ssh_keys_with_putty_and_not_get_server_refused_our_key" 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_. 1: Logon to whichever machine you ssh into and run the following commands. {code} fs setacl ~/.ssh/ system:anyuser rl stashticket {endcode} The first command changes the access rights of your .ssh folder to be readable by anyone, which is necessary because the remote side of SSH doesn't get a valid AFS token when using public/private keys. Note that this also means that your .bashrc won't execute on the remote machine before the git commands. The second command stashes your current AFS ticket so that =runauth= can use it 1: Test that you can now ssh w/o a password by entering something like: {code} plink.exe -2 -C -i c:\home\tannenba\.ssh2\putty.ppk %1 "/bin/date" {endcode} 1: 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 that =runauth= is used (to get an AFS token) and also so that the correct version of Git in /unsup/git is used. {code} @c:\utils\sshcvs\plink.exe -2 -C -i c:\home\tannenba\.ssh2\putty.ppk %1 "/s/std/bin/runauth /unsup/git/bin/%~2" {endcode} 1: You will need to run =stashticket= once a month on whatever machine you ssh into.