If Windows XP, make sure you have "Simple file sharing" OFF.
Start/My Computer - Tools/Options/View. Uncheck "Use simple file sharing (Recommended)".
Install latest winSSHd (http://www.bitvise.com/winsshd-download).
Install latest msysgit in C:\Program\Git. Select "Git bash" and Git's own ssh implementation while installing.
Append git bin directory in the path environment variable in Windows.
Create empty file myshell.sh in git bin directory.
Edit myshell.sh to contain nothing but the two characters $*
Create a user account in winSSHd. Settings/Edit advanced settings. Access control/Virtual accounts/Add
Edit the user: Scroll down until "Exec request path" and edit it to:
cmd.exe /c sh gitcmdhelper.shX
Replace the last X with a space.
Test from a remote computer that you can connect to your ssh server:
ssh user@yourcomputer.com
Create a bare repository on your server, for example:
mkdir C:\Mystuff\GitRepositories\hello.git
Start Git bash in this directory.
git init --bare
(The reason it being a "bare" repository is because you will not work and checkout stuff on your server into this repository. It will only be a bare repository containing the version controlled files/database.)
Time to see if this works from a remote computer. I use Eclipse with Egit. I strongly recommend that you use the latest version of both. In my case Eclipse Indigo SR1 and Egit 1.1.x.xxxxxxxxxxxx-x.
Select import Git project and "clone". The clone URI will look something like this, because git root is in C:\Program\Git
ssh://user@mygitserver/../../MyStuff/GitRepositories/hello.git
When you later commit and push you might get an error:
"error: Unable to append to .git/logs/refs/remotes/origin/master: Permission denied"
Then you have to change access rights on the server for all users so they can write to the hello.git directory. And that is when it's handy to NOT use "Simple file sharing" in Windows XP...
[2013-4] [2013-3] [2012-5] [2012-3] [2012-1] [2011-12] [2011-8] [2011-5] [2011-4] [2011-3] [2011-2] [2011-1] [2010-12] [2010-11] [2010-10] [2010-9] [2010-8] [2010-7] [2010-6] [2010-5] [2010-4] [2010-3] [2010-2] [2010-1] [2009-12] [2009-11] [2009-10] [2009-9] [2009-8] [2009-7] [2009-6] [2009-5] [2009-4] [2009-3] [2009-2] [2009-1] [2008-12] [2008-11] [2008-10] [2008-9] [2008-8] [2008-7] [2008-6] [2008-5] [2008-4] [2008-3] [2008-2] [2008-1] [2007-12] [2007-11] [2007-10] [2007-9] [2007-8] [2007-7] [2007-6] [2007-5] [2007-4] [2007-3] [2007-2] [2007-1] [2006-12] [2006-11] [2006-10] [2006-9] [2006-8] [2006-7] [2006-6] [2006-5] [2006-4] [2006-3] [2006-2] [2006-1] [2005-12] [2005-11] [2005-10] [2005-9] [2005-8] [2005-7] [2005-6] [2005-5] [2005-4] [2005-3] [2005-2] [2005-1] [2004-12] [2004-11] [2004-10] [2004-9] [2004-8] [2004-7] [2004-6] [2004-5] [2004-4] [2004-3] [2004-2] [2004-1] [2003-12] [2003-11] [2003-10] [2003-9]
Kommentarer
Add new Comment