在 Windows 计算机上设置 Git 服务器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30308534/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:13:28  来源:igfitidea点击:

Setup Git-server on windows computer

git

提问by Batto

So me and a friend of mine wanted to start programing and having Git as our server so we can easily "track" and have the control on our projects. The problem is, I've only been able to find old posts about Git on a private server (windows). I'd like to know if there is any guide or any tips regarding making a computer our server for both of us making the projects private (private repos) while been able to work either on the same location as the server or at other locations such as home,coffee,etc... I've tried GitStack but I wasn't able to put it to work (possibly due to wrong configurations I've very new to this yet). What do you guys suggest as having a windows computer as server in terms of programs to integrate with Git?

所以我和我的一个朋友想开始编程并使用 Git 作为我们的服务器,这样我们就可以轻松地“跟踪”并控制我们的项目。问题是,我只能在私人服务器(Windows)上找到有关 Git 的旧帖子。我想知道是否有关于将计算机作为我们的服务器的任何指南或任何提示,以便我们双方将项目设为私有(私有存储库),同时能够在与服务器相同的位置或其他位置工作,例如作为家,咖啡等......我试过GitStack,但我无法让它工作(可能是由于错误的配置,我对此还很陌生)。就与 Git 集成的程序而言,你们建议将 Windows 计算机作为服务器吗?

采纳答案by Dirk Trilsbeek

I use Bonobo git serveron windows to serve my repositories via https using IIS as the web server. It works quite well but has some quirks when you want to have active directory (windows) authentication (you essentially need 2 Bonobo instances which I somehow didn't manage to get working). I access my Bonobo git repositories from Visual Studio, TortoiseGit and the git console, it just works as expected.

我在 Windows 上使用Bonobo git 服务器通过 https 使用 IIS 作为 Web 服务器为我的存储库提供服务。它工作得很好,但是当您想要进行活动目录(Windows)身份验证时有一些怪癖(您本质上需要 2 个 Bonobo 实例,但我以某种方式无法正常工作)。我从 Visual Studio、TortoiseGit 和 git 控制台访问我的 Bonobo git 存储库,它按预期工作。

回答by Nick Volynkin

So me and a friend of mine wanted to start programing

所以我和我的一个朋友想开始编程

I'd recommend you to spend your effort and motivation on programming. Don't bother creating your own private remote repository, because you don't need one yet:

我建议您将精力和动力花在编程上。不要费心创建自己的私有远程存储库,因为您还不需要:

  1. Your local folder under git version control is already a git repository.
  2. If you want to collaborate:
    • GitHubis most popular for opensource projects, and it supports private repositories (up to 3 users).
    • GitLaballows private repositories for teams of unlimited size.
    • Bitbucketalso allows private repositories, available for teams of up to 5 users.
  1. 您在 git 版本控制下的本地文件夹已经是一个 git 存储库。
  2. 如果您想合作:
    • GitHub最受开源项目欢迎,它支持私有存储库(最多 3 个用户)。
    • GitLab允许不限规模的团队使用私有存储库。
    • Bitbucket还允许私有存储库,可供最多 5 个用户的团队使用。

There's a great collection of git references here: Git for beginners: The definitive practical guide

这里有大量 git 参考资料:Git for初学者:权威实用指南

回答by gomons

Windows

视窗

Some time ago I used Bonobo git server. Simple to install, configuration over web-interface.

前段时间我使用了Bonobo git server。安装简单,通过网络界面配置。

Linux

Linux

I don't like windows for git server. So I installed Linuxand gitolite3+gitweb. Simple to install, simple to use, more access control over repository, web access over gitweb.

我不喜欢 git 服务器的 windows。所以我安装了Linuxgitolite3+ gitweb。安装简单,使用简单,对存储库的更多访问控制,通过 gitweb 进行网络访问。

Now I use gitlab. Very simple to install and all configuration over web-interface.

现在我使用gitlab。安装非常简单,所有配置都通过网络界面进行。

回答by Philippe

On Windows, you could use gitbucket, gogs(a very good and painless git server) [edit: there is now a community fork of gogs that seems more alive https://gitea.io] or also gitblitthat are in java or scala and that are just a command away if you launch them from the war with the embedded http server.

在 Windows 上,你可以使用gitbucketgogs(一个非常好的和无痛的 git 服务器)[编辑:现在有一个 gogs 的社区分支,它看起来更活跃https://gitea.io] 或者还有gitblit,它们在 java 或 scala 中如果您使用嵌入式 http 服务器从War中启动它们,这只是一个命令。

But like said by @gomons, perhaps you should consider to use a Linux server (at least one VM --sometime downloadable in the project Web site-- in virtual box), that way your choice will be quite more large with a lot of good git server: gitlab,... Even gerrit if you want a code review tool

但是就像@gomons 所说的那样,也许您应该考虑使用 Linux 服务器(至少一个 VM——有时可在项目网站中下载——在虚拟框中),这样你的选择就会更大,有很多好的 git 服务器:gitlab,...如果你想要一个代码工具,甚至是 gerrit

On the web site of gitea, you have a good feature comparison : https://docs.gitea.io/en-us/comparison/

在gitea的网站上,你有一个很好的功能对比:https://docs.gitea.io/en-us/comparison/

回答by S. FRAJ

I use GitStack, a software equipped with an administration interface to manage your deposits. Moreover, it is simple to use and to install Personally, I recommend for both beginners and experts

我使用GitStack,这是一款配备管理界面的软件来管理您的存款。此外,它易于使用和安装个人,我推荐初学者和专家