寻找实现集中式 git 存储库......但有一个问题
我想做的事情背后的想法是在 Linux 系统上创建一个集中式服务器。我知道如何设置它,并且已经知道了。接下来我想在 Windows 系统(又名客户端)上设置 git,我知道这可以通过 msysgit 和 gitextensions 实现。但问题是我想要集成 Windows 客户端,以便能够推送和拉取 Visual Studio 文件,但将存储库保留在 Linux 服务器上。简而言之,我的问题是如何在Linux上为git建立一个集中式服务器,而Windows上的客户端能够推送到这个集中式服务器。提前致谢!
我解决了我的问题。我想做的是在服务器(linux)和客户端(windows)之间创建一个 ssh 连接。在本例中,我使用了 Tortoise git 和 git 源代码控制提供程序(Visual Studio 集成)。只需按照链接中的步骤操作,其他任何可能遇到此问题的人都将得到解决!
链接:
对于乌龟设置: http://theswarmintelligence.blogspot .com/2009/11/windows-tortoisegit-client-for-linux.html
The idea behind what I am wanting to do is to create a centralized server on a linux system. I understand how to set this up, and already have. Next I would like to set up git on a windows system, aka the client, which I understand is possible through msysgit, and gitextensions. The problem though is that I am wanting to integrate the windows client to be able to push and pull visual studio files but keep the repositories on the linux server. So in short my question is how to have a centralized server on linux for git, while the client on windows is able to push to this centralized server. Thanks in advance!
I solved my problem. What I wanted to do was to create a ssh connection between the server(linux) and the client (windows). I used tortoise git in this case with the git source control provider (visual studio integration). Just follow the steps within the link and anybody else who might have this problem will be set!
Links:
For tortoise setup: http://theswarmintelligence.blogspot.com/2009/11/windows-tortoisegit-client-for-linux.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里有什么问题?这听起来像是一个完全标准的用例。最好使用 SSH 作为推送到服务器的传输方式。需要注意的几件事是:
如果您有多个用户将推送到该存储库,请在Linux机器,并确保存储库的权限合适,例如:
或者如果您要要拥有多个存储库或需要更复杂的访问控制,您可能需要考虑在服务器。
在客户端,GitHub 有一个很好的演练,用于在 Windows 上安装 msysgit(并生成 SSH 密钥):
...并且有 gitextensions 教程 在其网站上。
What's the catch here? This sounds like a completely standard use case. It's probably best to use SSH as a transport to push to the server. A couple of things to be aware of are:
If you have multiple users who will push to that repository, create a group for them on the Linux machine, and make sure that the permissions for the repository are appropriate, e.g.:
Or if you're going to have multiple repositories or need more sophisticated access control, you may want to look at using gitolite on the server.
On the client side, GitHub has a nice walkthrough for installing msysgit on Windows (and generating an SSH key) here:
... and there are tutorials for gitextensions on its site.