gogs 中的组织问题

Organizations issue in gogs

我是 Gogs 的新手。在创建组织(组)方面遇到问题。

我创建了一个组织 Org-A 并向其中添加了一个私有存储库 Repo-A。我向该组织添加了另一个用户 User-A(作为成员和团队成员)。但是当 User-A 想要查看 Repo-A 的内容时,Gogs 会显示“404:未找到”页面。当我把Repo-A的隐私改成public的时候,User-A可以看到,其他用户也可以看到。

如何将存储库分组到组织中并向这些组织添加不同的用户,以便用户可以 read/write 他们所属组织中的存储库?我希望回购 visible/editable 仅适用于组织成员。

issue 1744所述:

Adding those users to team under organization solves to issue.

Somehow we expected to default behavior of joining an Organization should give those users to read permission.

如果这仍然不起作用(即用户已经在正确组织的团队中):

  • double-check大小写url(区分大小写)
  • 尝试并检查您是否使用 gitea(gogs 的一个分支)重现相同的问题

作为 by Hamish Carpenter:

I finally found the screen to add link teams with repositories.
This then allows you to add repositories to other teams eg Developers.

When you see the team on the right hand side, click on the "0 Repositories" link then add the repositories like you'd add team members.

Igor Dejanović 添加:

You set the permission on the team.
Then on the team page follow the links "x members" to add new member and "y repositories" to add new repository.
Team is essentially a many-to-many link between members and repositories.

也许 对于旧版本的 gogs 是正确的,但在我的版本 (0.11.43) 中它是 不正确的

您可以在这里阅读 gogs 维护者 (Unknown) 写的内容:

By design, only the Owners team get access when create a new repository, if need to add this repository to other teams manually. gogs issue #1834

还有 discussion on how to make team repos。 (看看这个 link 中的图像,您就会了解如何将存储库添加到组织中的团队)。

为了说明这一点,我将在此处添加一些信息:

对我来说,困惑来自于我曾经将成员作为协作者添加到存储库中,但在组织团队中,您需要将存储库添加到团队中。

在 Gogs 组织中,您可以创建 repositoriesteams。 默认情况下,每个组织都有一个名为:Owners 的团队。 Owners 的团队成员可以 read/write 组织中的所有 repos。

对于您创建的每个新团队,团队开始时都没有与之关联的存储库,因此团队成员无法访问任何私有存储库(对于 public 存储库,任何人都可以看到它们没有问题)。

您可以将任何组织存储库添加到每个团队,并在团队设置页面中设置权限(read/write)

返回具体问题:

Org-A -> team-A(write/read 权限) -> member-A

Org-A:Repo-A(私人)

如果您希望 team-A 的任何成员访问 Repo-A,请将 Repo-A 添加到 team-A 存储库。

必须完成一些在组织许可过程中仍然感觉不对的事情:

  • 可以将任何用户作为协作者手动添加到任何存储库,并直接从存储库设置中设置其权限
  • 但是,无法在同一屏幕中将团队添加为协作者(这应该从团队页面完成)。
  • 更重要的是,如果您进入 repo 设置 - 协作页面,您将看不到可以访问此 repo 的团队,您只会看到手动设置的用户。