如何在 GitHub 上设置私有 Git 存储库?甚至有可能吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2600230/
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
How do I set up a private Git repository on GitHub? Is it even possible?
提问by LearnCocos2D
I intend to share my source code on an invite-only basis to a few dozen users maybe. The source code itself should not be public. Participants are allowed and encouraged to submit their changes. So I need source control, preferably Git, hosted on a public server with private access for multiple users.
我打算在仅限邀请的基础上将我的源代码分享给几十个用户。源代码本身不应该是公开的。允许并鼓励参与者提交他们的更改。所以我需要源代码控制,最好是 Git,托管在公共服务器上,多个用户可以私有访问。
I learned that it is possible to set up private Git repositories on GitHub which use https:// links. On GitHub itself such a project does not show up in searches. For participating users the project shows a "lock" icon. So there are obviously private repositories; I just don't know how set one up. A lot of tutorials use SSH to set up private repositories but they all require you to have "your own server".
我了解到可以在 GitHub 上设置使用 https:// 链接的私有 Git 存储库。在 GitHub 本身上,这样的项目不会出现在搜索中。对于参与用户,项目显示“锁定”图标。所以显然有私有仓库;就是不知道怎么设置 许多教程使用 SSH 来设置私有存储库,但它们都要求您拥有“自己的服务器”。
I don't care about secure connections when pushing/pulling source code nor do I have trust issues with GitHub. All I care about is giving access only to users I invite. Maybe I'm naive and such a solution is only available via commercial hosting (e.g., Unfuddle, Assembla), but if not, I'd really like to know how it's done!
我在推/拉源代码时不关心安全连接,也不关心 GitHub 的信任问题。我所关心的只是仅授予我邀请的用户访问权限。也许我很天真,这样的解决方案只能通过商业托管(例如,Unfuddle,Assembla)获得,但如果不是,我真的很想知道它是如何完成的!
回答by Thomas
回答by Ben Duffin
Bitbucket- Their plans seem to be the best. They give you way more than GitHub do for free accounts - in fact, I'm still only using the free plan - no need to sign up to the paid ones; plus the interface is almost identical to GitHub.
Bitbucket- 他们的计划似乎是最好的。他们为您提供的方式比 GitHub 为免费帐户提供的要多 - 事实上,我仍然只使用免费计划 - 无需注册付费帐户;加上界面几乎与GitHub相同。
A repository on Bitbucket can have up to fiveprivate users with unlimited public or private repositories - the only thing you seem to be paying for with the paid accounts are more users to access your private repositories.
Bitbucket 上的存储库最多可以有五个私人用户,拥有无限的公共或私人存储库 - 您似乎使用付费帐户支付的唯一费用是更多用户访问您的私人存储库。
回答by jutky
If you are a student you can get a free private repository at https://github.com/edu
如果你是学生,你可以在https://github.com/edu获得一个免费的私人存储库
Update
更新
As noted in another answer, now there is an option for private repos also for simple users
正如另一个答案中所指出的,现在也为简单用户提供了私人回购的选项
回答by beakr
GitHub is a great tool in-all for making repositories. However, it does not do good with private repositories.
GitHub 是一个很好的工具,用于创建存储库。但是,它不适用于私有存储库。
You're forced to pay for private repositories unless you get some sort of plan. I have a couple of projects so far, and if GitHub doesn't do what I want I just go to Bitbucket. It's a bit harder to work with than GitHub, however it's unlimited free repositories.
除非您有某种计划,否则您将被迫为私有存储库付费。到目前为止,我有几个项目,如果 GitHub 没有做我想做的事,我就去 Bitbucket。它比 GitHub 更难使用,但它是无限的免费存储库。
回答by VonC
Since January 7th, 2019, it ispossible: unlimited free private repositories on GitHub!
... But for up to three collaborators per private repository.
自 2019 年 1 月 7 日起,有可能:GitHub 上无限制的免费私人存储库!
... 但是对于每个私有存储库最多三个协作者。
Nat Friedmanjust announced it by twitter:
Today(!) we're thrilled to announce unlimited free private repos for all GitHub users, and a new simplified Enterprise offering:
今天(!)我们很高兴地宣布为所有 GitHub 用户提供无限制的免费私人存储库,以及一个新的简化的企业产品:
"New year, new GitHub: Announcing unlimited free private repos and unified Enterprise offering"
“新的一年,新的 GitHub:宣布无限的免费私人回购和统一的企业产品”
For the first time, developers can use GitHub for their private projects with up to three collaborators per repository for free.
Many developers want to use private repos to apply for a job, work on a side project, or try something out in private before releasing it publicly.
Starting today, those scenarios, and many more, are possible on GitHub at no cost.Public repositories are still free (of course—no changes there) and include unlimited collaborators.
开发人员第一次可以将 GitHub 用于他们的私人项目,每个存储库最多可免费使用三个协作者。
许多开发人员希望使用私有 repos 来申请工作、从事业余项目或在公开发布之前私下尝试一些东西。
从今天开始,这些场景以及更多场景都可以在 GitHub 上免费使用。公共存储库仍然是免费的(当然——那里没有变化)并且包括无限的合作者。
回答by Chris Paul
Once you have a paid account on GitHub, it is not obvious how to create a private repository. To create a private repository for an organization with paid account, go to https://github.com/organizations/MYORGANIZATIONNAME.
一旦您在 GitHub 上拥有付费帐户,如何创建私有存储库就不是很明显了。要为具有付费帐户的组织创建私有存储库,请转到https://github.com/organizations/MYORGANIZATIONNAME。
The only way I've figured how to navigate there is:
我想出如何在那里导航的唯一方法是:
- Go to to your organization's home page: https://github.com/MYORGANIZATIONNAME
- Click on the "Edit MYORGANIZATION's Profile" button at the top right
- Click on the "GitHub" icon at the top left (non-obvious)
- Click on the "News Feed" tab (non-obvious)
- Click on the "New Repository" button at the right ...
- 转到您组织的主页:https: //github.com/MYORGANIZATIONNAME
- 点击右上角的“编辑MYORGANIZATION的个人资料”按钮
- 点击左上角的“GitHub”图标(不明显)
- 单击“新闻提要”选项卡(不明显)
- 单击右侧的“新建存储库”按钮...
回答by Fangming
Update (2019, latest)
更新(2019,最新)
Since Jan 2019, GitHub allows private repositories for up to three collaborators.
自 2019 年 1 月起,GitHub 允许最多三个协作者使用私有存储库。
Previous answer:
上一个答案:
Here is the comparison for free plans listed by tree main Git Cloud based solutions:
以下是基于 Git Cloud 的树主要解决方案列出的免费计划的比较:
Here is the comparison for paid plans listed by tree main Git Cloud based solutions:
以下是基于 Git Cloud 的树主要解决方案列出的付费计划的比较:
Conclusion:
结论:
I'm not seeing people mentioning GitLab here, but it seems like the best free private plan for me. I myself am using it with no problems.
我没有看到人们在这里提到 GitLab,但这对我来说似乎是最好的免费私人计划。我自己正在使用它,没有任何问题。
GitHub:If you have a student account or want to pay for $7 monthly, GitHub has the biggest community and you can take advantage of it's public repositories, forks, etc.
GitHub:如果您有学生帐户或想每月支付 7 美元,GitHub 拥有最大的社区,您可以利用它的公共存储库、分叉等。
Bitbucket:If you use other products from Atlassian like Jiraor Confluence, Bitbucket works great with them.
Bitbucket:如果您使用来自 Atlassian 的其他产品,例如Jira或Confluence,Bitbucket 可以很好地与它们配合使用。
GitLab:Everything that I care about (free private repository, number of private repositories, number of collaborators, etc.) are offered for free. This seems like the best choice for me.
GitLab:我关心的一切(免费的私有仓库、私有仓库的数量、合作者的数量等)都是免费提供的。这对我来说似乎是最好的选择。