Search code examples
gitgogs

Organizations issue in gogs


I am new to Gogs. Have a trouble related to creating organizations (groups).

I created an organization Org-A and added a private repository Repo-A to it. I added another user User-A to this organization (as a member and a team member). But when User-A wants to see content of Repo-A, Gogs shows a "404: Not Found" page. When I change the privacy of Repo-A to public User-A can see it, but all other users also can see it.

How can I group repositories into organizations and add different users to these organizations, that users can read/write repositories in the organization they are member of? I want repos to be visible/editable only for organization members.


Solution

  • As mentioned in 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.

    If this is still not working (ie, the User was already in a Team of the right organization):

    • double-check the case of the url (it is case sensitive)
    • try and check if you reproduce the same problem with gitea (a fork of gogs)

    As commented 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ć adds:

    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.