title: Git server under Windows using FreeSSHd
body: <p>I'm trying to setup git as server on Windows.</p>
  
  <ol>
  <li>Installed freesshd, configured it, and checked ssh from linux machine, it works.</li>
  <li>Downloaded Git for Windows, and installed it, in PATH added git\bin and git\libexec\git-core</li>
  <li>Made bare repository in d:\GitRepo\u7.git</li>
  </ol>
  
  <p>when I'm trying</p>
  
  <pre><code>git clone serhiy@192.168.75.2:d:/gitrepo/u7.git
  </code></pre>
  
  <p>I get well known "bad line length character: fata".</p>
  
  <p>But typing </p>
  
  <pre><code>ssh 192.168.75.2 git-receive-pack d:/gitrepo/u7.git
  </code></pre>
  
  <p>I've got legal answer</p>
  
  <blockquote>
    <p>00900000000000000000000000000000000000000000 capabilities^{} report-status delete-refs side-band-64k quiet ofs-delta agent=git/1.8.1.msysgit.1
    0000</p>
  </blockquote>
  
  <p>What can be wrong?
  As I understood i can't get to the correct folder while "git clone", I tried ssh://, sh.exe instead of cmd.exe, tried cmd /K "d: &amp;&amp; cd \gitrepo" то set the current folder, and nothing. But I have working git-receive-pack d:/gitrepo/u7.git.
  Do I need to point current folder for the repository?</p>
  
  <p><strong>UPDATE:</strong>
  After reading a last post in <a href="https://stackoverflow.com/questions/1092583/how-to-stop-git-via-ssh-on-windows-from-resolving-the-wrong-path">this topic</a> I've created pointed files and cloned project</p>
  
  <p>Create file gup.sh with line</p>
  
  <blockquote>
    <p>git-upload-pack.exe $*</p>
  </blockquote>
  
  <p>and grp.sh with</p>
  
  <blockquote>
    <p>git-receive-pack.exe $*</p>
  </blockquote>
  
  <p>on server!</p>
  
  <p>Then clone repository</p>
  
  <pre><code>git clone -u 'sh gup.sh' ssh://serhiy@192.168.75.2/d/gitrepo/u7.git
  </code></pre>
  
  <p>and set some configs</p>
  
  <pre><code>git config --global remote.origin.uploadpack 'sh gup.sh'
  git config --global remote.origin.receivepack 'sh grp.sh'
  </code></pre>
  
  <p>It seems it work under linux.
  Under windows I cannot just login, have Permession denied.</p>
  
  <p><strong>UPDATE:</strong>
  Since I've moved to using RSA keys, everything works, so 
  I have:</p>
  
  <ol>
  <li>Windows Server 2003</li>
  <li>Installed FreeSHHd on it</li>
  <li>Access from Linux and Windows machines to Git repositorie using RSA authentication.</li>
  <li>As shell on server I use git's sh.exe</li>
  <li>A wierd way to clone repository first time git clone -u 'sh gup.sh' ssh://192.168.75.2/d/gitrepo/u7.git</li>
  </ol>