Maybe the previous answer by Vonc was correct for older versions of gogs, but in my version (0.11.43) it is not correct.
You can read what the gogs maintainer (Unknown) wrote about it here:
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
And also, the discussion on how to make team repos. (One look at the image inside this link and you'll understand how to add repos to teams in an organization).
To make this clear, I will add some info here:
For me the confusion come from the fact that I used to add members as collaborators into repos, but in the organizations-teams, you need to add the repos into the teams.
In a Gogs organization you can create repositories
and teams
.
By default each organization comes with one team named: Owners
.
the team members of Owners
can read/write all the repos in the organization.
For each new team you create, the team starts with no repositories associated with it, so the team members cannot access any private repositories (for public repos there is no issue anyone can see them).
You can add any of the organization repos to each team, and in the teams settings page, set the permissions (read/write)
Returning to the specific question:
Org-A
-> team-A
(write/read permission only) - > member-A
Org-A
:Repo-A
(private)
if you want any member of team-A
to access Repo-A
, Add Repo-A
into team-A
repositories.
Have to finish with something that still not is feeling right in the organization permission process:
- it is possible to manually add any user to any repo as a collaborator and set its permission directly from the repo settings
- but, it is not possible to add in the same screen a team as a collaborator, (this should be done from the team page).
- and more then that, if you enter into the repo settings - collaboration page, you will not see the teams that can access this repo, you will see only manually set users.