php 如何在我自己的服务器上拥有 Github?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8390828/
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-08-26 04:36:03  来源:igfitidea点击:

How can I have Github on my own server?

phpgitgithub

提问by JasonDavis

Is there anything out there like Github that is for your own local server? I am curious if there is like a PHP script or even a desktop client that mimics Github's functionality, I love Github but it would be nice to host on my own server.

有没有像 Github 这样的东西可以用于你自己的本地服务器?我很好奇是否有类似的 PHP 脚本,甚至是模仿 Github 功能的桌面客户端,我喜欢 Github,但在我自己的服务器上托管会很好。

Apologies if this isn't considered "programming" enough but generally only programmers use GIT and Github

如果这还不够“编程”,但通常只有程序员使用 GIT 和 Github,请道歉



Update

更新

First of all thanks for all the great suggestions, it is great to see there are options out there. From what is posted here and from my googling I can say it looks like the best looking/most alike to Github solutions are coded in Ruby, which is great for some but I am a PHP kind of guy (for now).

首先,感谢所有伟大的建议,很高兴看到有很多选择。从这里发布的内容和我的谷歌搜索来看,我可以说看起来最好看/与 Github 最相似的解决方案是用 Ruby 编码的,这对某些人来说很棒,但我是一个 PHP 类型的人(现在)。

Most of the PHP GIT viewers either are outdated and abandoned projects or they just look like crap ( I realize I could fix them up to be more like Github) but I ran across something in PHP that looks promising so far. It is called Glip it is on Github here https://github.com/patrikf/glipand to me it is the most attractive and easy to use solution I have found for PHP so far. For the advanced Git user, it may not be enough but for me, I just wanted to be able to view a git repo and that provides that functionality.

大多数 PHP GIT 查看器要么是过时的和废弃的项目,要么看起来很垃圾(我意识到我可以将它们修复得更像 Github),但我在 PHP 中遇到了一些到目前为止看起来很有希望的东西。它被称为 Glip,它在 Github 上https://github.com/patrikf/glip对我来说,它是迄今为止我为 PHP 找到的最有吸引力和最易于使用的解决方案。对于高级 Git 用户,这可能还不够,但对我来说,我只想能够查看提供该功能的 git 存储库。

Now my search still continues for the perfect solution, will I ever find it? I hope so but, for now, this is we got. I am considering writing my own, one that is attractive like Github and has other features like an Issue tracker for bug and feature requests. All the ones I have seen so far are not so good

现在我仍在继续寻找完美的解决方案,我会找到它吗?我希望如此,但就目前而言,这是我们得到的。我正在考虑编写自己的,一个像 Github 一样吸引人的,并具有其他功能,例如用于错误和功能请求的问题跟踪器。到目前为止我所看到的都不是那么好

采纳答案by manojlds

There is GitHub Enterpriseto satisfy your needs. And there is an open source "clone"of Github Enterprise.

GitHub的企业,以满足您的需求。并且有一个Github Enterprise 的开源“克隆”

PS: Now Github provides unlimited private repositories, bitbucketdoes the same. you can give a try to both. There are several other solutions as well.

PS:现在 Github 提供了无限的私有仓库,bitbucket也是如此。你可以尝试两者。还有其他几种解决方案。

回答by marc

I'm quite surprised nobody mentioned the open-sourceproject gogs (http://gogs.io)or a derived fork of it called gitea (http://gitea.io)which basically offers the same what gitlab does, but with minimal system resources (low footprint), being perfect to run in a Raspberry Pi for example. Installation and maintenance is also way simpler.

我很惊讶没有人提到开源项目gogs (http://gogs.io)或它的衍生分支gitea (http://gitea.io),它基本上提供了与 gitlab 相同的功能,但与最少的系统资源(低占用空间),例如非常适合在 Raspberry Pi 中运行。安装和维护也更简单。

回答by scott-joe

Gitlab has made their service available to run on your own server for free. https://about.gitlab.com/downloads/

Gitlab 已经让他们的服务可以免费在你自己的服务器上运行。 https://about.gitlab.com/downloads/

回答by RyanWilcox

There are some open source alternatives:

有一些开源替代方案:

回答by Daniel M. Melo

you should check out this one: http://gitlist.org/.

你应该看看这个:http: //gitlist.org/

It is written in PHP as you wanted it to be.

它是用 PHP 编写的,如您所愿。

回答by Pablo Maurin

If you must have GitHub, there is the enterprise version as already mentioned.

如果您必须拥有 GitHub,则可以使用前面提到的企业版。

If you want to look for alternatives for running a central git server for your company, you can try Gitolite.

如果您想为您的公司寻找运行中央 git 服务器的替代方案,您可以尝试 Gitolite。

https://github.com/sitaramc/gitolite
https://github.com/sitaramc/gitolite/wiki/

https://github.com/sitaramc/gitolite
https://github.com/sitaramc/gitolite/wiki/

回答by lorenzo-s

I searched for git PHP implementations too, but with no results. The only way to re-create a site similar to GitHub is to setup a "real" git server on your own server and then use a PHP git web client like http://www.xiphux.com/programming/gitphp/.

我也搜索了 git PHP 实现,但没有结果。重新创建类似于 GitHub 的站点的唯一方法是在您自己的服务器上设置一个“真正的”git 服务器,然后使用 PHP git web 客户端,如http://www.xiphux.com/programming/gitphp/

Unfortunatly, you can forget to do this with a hosting solution. You need a real virtual server where you can install everything you want.

不幸的是,您可能会忘记使用托管解决方案来执行此操作。您需要一个真正的虚拟服务器,您可以在其中安装所需的一切。

However, if you need a place where store some personal, non-public, non-accessible-to-everyone code for a project, you can try BitBucket. It offers private and private-shared git repos for free.

但是,如果您需要一个地方来存储一些个人的、非公开的、每个人都无法访问的项目代码,您可以尝试 BitBucket。它免费提供私有和私有共享的 git 存储库。

回答by grumpasaurus

Atlassian's Stash (Now called BitBucket Server)is getting there to being a good Github Enterprise alternative. I'm a bit of a JIRA whore so I like the integrations you have with that.

Atlassian 的 Stash(现在称为 BitBucket Server)正在成为一个很好的 Github Enterprise 替代方案。我有点像 JIRA 妓女,所以我喜欢你与它的集成。

回答by Kiran Maniya

You have a lot of options to run your own git server,

你有很多选择来运行你自己的 git 服务器,

  1. Bitbucket Server

    Bitbucket Server is not free, but not costly. It costs you one time only(10$ as of now). Bitbucket is a nice option if you want a long-lasting solution.

  2. Gitea(https://gitea.io/en-us/)

    Gitea it's an open-source project. It's cross-platform and lightweight. You can use it without any cost. originally forked from Gogs(http://gogs.io). It is lightweight code hosting solution written in Golang and released under the MIT license. It works on Windows, macOS, Linux, ARM and more.

  3. Gogs(http://gogs.io)

    Gogs is a self-hosted and open source project having around 32k stars on github. You can set up the Gogs at no cost.

  4. GitLab(https://gitlab.com/)

    GitLab is a free, open-source and a web-based Git-repository manager software. It has a wiki, issue tracking, and other features. The code was originally written in Ruby, with some parts later rewritten in Golang. GitLab Community Edition (CE) is an open-source end-to-end software development platform with built-in version control, issue tracking, code review, CI/CD, and more. Self-host GitLab CE on your own servers, in a container, or on a cloud provider.

  5. GNU Savannah(https://savannah.gnu.org/)

    GNU Savannah is free and open-source software from the Free Software Foundation. It currently offers CVS, GNU arch, Subversion, Git, Mercurial, Bazaar, mailing list, web hosting, file hosting, and bug tracking services. However, this software is not for new users. It takes a little time to setup and masters everything about it.

  6. GitPrep(http://gitprep.yukikimoto.com/)

    GitPrep is Github clone. you can install portable GitHub system into UNIX/Linux. You can create users and repositories without limitation. This is free software.

  7. Kallithes(https://kallithea-scm.org/)

    Kallithea, a member project of Software Freedom Conservancy, is a GPLv3'd, Free Software source code management system that supports two leading version control systems, Mercurial and Git, and has a web interface that is easy to use for users and admins. You can install Kallithea on your own server and host repositories for the version control system of your choice.

  8. Tuleap(https://www.tuleap.org/)

    Tuleap is a Software development & agile management All-in-one, 100% Open Source. You can install it on docker or CentOS server.

  9. Phacility(https://www.phacility.com/)

    Phabricator is open source and you can download and install it locally on your own hardware for free. The open source install is a complete install with the full featureset.

  1. 比特桶服务器

    Bitbucket Server 不是免费的,但并不昂贵。它只花费您一次(截至目前为 10 美元)。如果您想要一个持久的解决方案,Bitbucket 是一个不错的选择。

  2. Gitea( https://gitea.io/en-us/)

    Gitea 它是一个开源项目。它是跨平台和轻量级的。您可以免费使用它。最初从 Gogs(http://gogs.io)分叉。它是用 Golang 编写并在 MIT 许可下发布的轻量级代码托管解决方案。它适用于 Windows、macOS、Linux、ARM 等。

  3. Gogs( http://gogs.io)

    Gogs 是一个自托管的开源项目,在 github 上拥有大约 32k 颗星。您可以免费设置 Gogs。

  4. GitLab( https://gitlab.com/)

    GitLab 是一款免费、开源且基于 Web 的 Git 存储库管理器软件。它具有 wiki、问题跟踪和其他功能。代码最初是用 Ruby 编写的,后来用 Golang 重写了一些部分。GitLab 社区版 (CE) 是一个开源的端到端软件开发平台,具有内置的版本控制、问题跟踪、代码、CI/CD 等功能。在您自己的服务器、容器或云提供商上自托管 GitLab CE。

  5. GNU 萨凡纳( https://savannah.gnu.org/)

    GNU Savannah 是自由软件基金会的免费开源软件。它目前提供 CVS、GNU arch、Subversion、Git、Mercurial、Bazaar、邮件列表、网络托管、文件托管和错误跟踪服务。但是,该软件不适用于新用户。设置和掌握有关它的一切需要一点时间。

  6. GitPrep( http://gitprep.yukikimoto.com/)

    GitPrep 是 Github 克隆。您可以将便携式 GitHub 系统安装到 UNIX/Linux 中。您可以不受限制地创建用户和存储库。这是免费软件。

  7. Kallithes( https://kallithea-scm.org/)

    Kallithea 是 Software Freedom Conservancy 的成员项目,是一个 GPLv3 的自由软件源代码管理系统,支持两个领先的版本控制系统 Mercurial 和 Git,并具有易于用户和管理员使用的 Web 界面。您可以在您自己的服务器和主机存储库上安装 Kallithea,用于您选择的版本控制系统。

  8. 图勒普( https://www.tuleap.org/)

    Tuleap 是一个软件开发和敏捷管理一体化,100% 开源。您可以将其安装在 docker 或 CentOS 服务器上。

  9. Pacility( https://www.phacility.com/)

    Phabricator 是开源的,您可以免费下载并在本地安装到您自己的硬件上。开源安装是具有完整功能集的完整安装。

回答by Luigi R. Viggiano

I tried gitosisthat is fully command line. And I chose this one.

我尝试了完全命令行的gitosis。而我选择了这个。

Being a Java guy, I also looked with interest to Gitblit.

作为一个 Java 人,我也对Gitblit感兴趣。