git、远程访问 - ssh
我有两台电脑,都是windows xp。
我想使用第一个作为 git 服务器,第二个作为工作站。
在本地计算机上,git 工作得很好,但为了两台计算机之间的通信,我需要 ssh。 (我想)
我找到了程序 sshwindows,但我无法安装他,安装过程中出现一些错误。 另一种可能性是 cygwin,但我对此没有经验。
还有其他想法吗,如何在 XP 上为 2 台计算机制作 git 服务器和客户端?
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 instalation.
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不要为cygwin烦恼。 MSysGit bash 非常好。
最简单的解决方案是使用文件 url。
我建议不要使用
\\server\share\repo
规范,因为子模块无法使用此语法工作。使用 file:///\\server\share\repo 语法,这样当您最终决定使用子模块时,您将不必重写您的 URL。
如果您需要安全连接和一些管理,我强烈建议您采用 Linux 路线,通过 virtualbox 安装小型虚拟机并安装 ubuntu 服务器。如果你想与跟踪器等集成,Gitolite、gitweb 等应该很好而且很容易在那里做很多事情。
作为早期采用者使用 Git 的多年痛苦岁月以及仍在 Windows 上使用它表明这是最不痛苦的方式去做这件事。
希望这有帮助。
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 不是唯一的选择。
例如,您可以创建一个共享目录并将其用作远程存储库。
ssh is not the only option.
So for example you can make a shared directory and use that as remote repository.
在服务器上设置一个 Windows 共享目录(称为 gitroot 之类的目录)并将存储库放入其中。然后,您将能够使用以下命令在工作机器上克隆:
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: