开发者

git, remote access - ssh

I have two computers with windows xp.

I want to use the first one as git server and second one as working station.

On local computer works git very well, but for comunication between 2 computers I need ssh. (I suppose)

I've found program sshwindows, but I cant install him, some error during instalatio开发者_如何转开发n. Another posibility is cygwin, but I have no experience with that.

Is there any other Idea, how can I make git server and client for 2 computers on XP?


Don't bother with cygwin. MSysGit bash is very nice.

The simplest solution is to use the file url.

I would advise against using the \\server\share\repo specification as submodules do not work using this syntax.

Use the file:///\\server\share\repo syntax so when you decide to use a submodule eventually, you will not have to rewrite your urls.

Should you need to have a secure connection and some administration, I would highly recommend going the linux route by installing a small vm via virtualbox and an ubuntu server install. Gitolite, gitweb, etc should be nice and easy to do lots there if you want to integrate with a tracker, etc.

Many painful years of using Git as an early adopter and still using it on windows has shown that this is the least painful way of going about it.

Hope this helps.


ssh is not the only option.

Git natively supports ssh, git, http, https, ftp, ftps, and rsync protocols. The following syntaxes may be used with them:

  • ssh://[user@]host.xz[:port]/path/to/repo.git/
  • git://host.xz[:port]/path/to/repo.git/
  • http[s]://host.xz[:port]/path/to/repo.git/
  • ftp[s]://host.xz[:port]/path/to/repo.git/
  • rsync://host.xz/path/to/repo.git/

For local repositories, also supported by git natively, the following syntaxes may be used:

  • /path/to/repo.git/
  • file:///path/to/repo.git/

So for example you can make a shared directory and use that as remote repository.


Set up a windows shared directory (called something like gitroot) on your server and put your repositories in there. You will then be able to clone on your working machine using something like:

git clone file:///\\server\gitroot\repo.git 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜