Cannot access team members' fork of private repository #1444

Closed
opened 2025-11-02 04:01:04 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @san127127 on GitHub (Jan 12, 2018).

  • Gitea version (or commit ref): 1.3.2
  • Git version: 2.13.0.windows.1
  • Operating system: Window server 2012
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Say there is a team, the team has access to an organization's private repository and there are two team members X and Y. When X fork the repository and Y tries to access X's fork, Y gets 404.

Sorry if it is the expected behavior. However, it seems Github allows Y to access X's repository and I expect Gitea behaves the same.
Reference

Originally created by @san127127 on GitHub (Jan 12, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.3.2 - Git version: 2.13.0.windows.1 - Operating system: Window server 2012 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description Say there is a team, the team has access to an organization's private repository and there are two team members X and Y. When X fork the repository and Y tries to access X's fork, Y gets 404. Sorry if it is the expected behavior. However, it seems Github allows Y to access X's repository and I expect Gitea behaves the same. [Reference](https://help.github.com/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility/#private-forks-and-permissions)
GiteaMirror added the type/enhancement label 2025-11-02 04:01:04 -06:00
Author
Owner

@krrutkow commented on GitHub (Mar 7, 2018):

I have encountered the related problem with private repos where a team member is trying to evaluate a pull request and they are unable to inspect commits (get 404) because they are referencing the commits in the other team member's repo.

Perhaps this isn't the intent of the OP, but I only require that the commits in the UI are exposed with the pull/#/head refs in the parent repo rather than using the forked repo.

@krrutkow commented on GitHub (Mar 7, 2018): I have encountered the related problem with private repos where a team member is trying to evaluate a pull request and they are unable to inspect commits (get 404) because they are referencing the commits in the other team member's repo. Perhaps this isn't the intent of the OP, but I only require that the commits in the UI are exposed with the pull/#/head refs in the parent repo rather than using the forked repo.
Author
Owner

@lafriks commented on GitHub (Mar 7, 2018):

@krrutkow pull head ref with commits is already kept in base repository and from 1.4 it's already used to display merged PR commits and changes so you are probably right, they can be used to display also unmerged PR commits

@lafriks commented on GitHub (Mar 7, 2018): @krrutkow pull head ref with commits is already kept in base repository and from 1.4 it's already used to display merged PR commits and changes so you are probably right, they can be used to display also unmerged PR commits
Author
Owner

@Piraty commented on GitHub (Feb 13, 2019):

Hi. using gitea-1.7.0, this issue unfortunately still is open.
In a private repository that has a few collaborators added, it's impossible to see the commit text in a pull request, because the link (in the "commit" tab, lighlighted hash) refers to the authors (inherited private) repository (results in 404).
@lafriks you mentioned pull/#/commit/<hash> could be used to view unmerged commits, but it doesn't work (at least in my situation, where no teams are involved). It results in a login-form, which redirects to 404 too.

@Piraty commented on GitHub (Feb 13, 2019): Hi. using `gitea-1.7.0`, this issue unfortunately still is open. In a private repository that has a few collaborators added, it's impossible to see the commit text in a pull request, because the link (in the "commit" tab, lighlighted hash) refers to the authors (inherited private) repository (results in 404). @lafriks you mentioned `pull/#/commit/<hash>` could be used to view unmerged commits, but it doesn't work (at least in my situation, where no teams are involved). It results in a login-form, which redirects to 404 too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1444