Cannot fork repo I own, cannot push new branch to it (permission denied) #3416

Closed
opened 2025-11-02 05:12:16 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @strk on GitHub (Jun 3, 2019).

I'm experiencing this frustrating event on gitea.com:

  1. I have a fork of gitea/tea
  2. The "fork" button on gitea/tea is grayed out with message "you cannot fork a repository you own"
  3. I cannot push a new branch to the main repo: "remote: User permission denied"
  4. I cannot file a pull request from existing fork because that fork is not found by the pull-down menu

This is, as reported from gitea.com: Gitea Version: 1.9.0+dev-316-g9002c5157

Originally created by @strk on GitHub (Jun 3, 2019). I'm experiencing this frustrating event on gitea.com: 1. I have a fork of gitea/tea 2. The "fork" button on gitea/tea is grayed out with message "you cannot fork a repository you own" 3. I cannot push a new branch to the main repo: "remote: User permission denied" 4. I cannot file a pull request from existing fork because that fork is not found by the pull-down menu This is, as reported from gitea.com: Gitea Version: 1.9.0+dev-316-g9002c5157
GiteaMirror added the issue/confirmed label 2025-11-02 05:12:16 -06:00
Author
Owner

@strk commented on GitHub (Jun 3, 2019):

For the record: my fork is seen when hitting the "forks" button:
https://gitea.com/gitea/tea/forks
just isn't shown in the pull-down menu from https://gitea.com/gitea/tea/compare/master...master

@strk commented on GitHub (Jun 3, 2019): For the record: my fork is seen when hitting the "forks" button: https://gitea.com/gitea/tea/forks just isn't shown in the pull-down menu from https://gitea.com/gitea/tea/compare/master...master
Author
Owner

@zeripath commented on GitHub (Jun 3, 2019):

So if I understand the situation correctly you shouldn't be able to push a new branch to the main repo as there is a protected branch.

I think you're suffering from the poor design of the compare endpoint.

I think your PR link should be:

https://gitea.com/gitea/tea/compare/master...strk:pulls-create

but this screen is somewhat broken and I think it needs a lot more work.

@zeripath commented on GitHub (Jun 3, 2019): So if I understand the situation correctly you shouldn't be able to push a new branch to the main repo as there is a protected branch. I think you're suffering from the poor design of the compare endpoint. I think your PR link should be: https://gitea.com/gitea/tea/compare/master...strk:pulls-create but this screen is somewhat broken and I think it needs a lot more work.
Author
Owner

@lunny commented on GitHub (Jun 3, 2019):

  1. You have a fork so that you cannot fork it twice, but I think it's not right that you could fork it to another organization. This should be improved.
  2. You have no permission to push a branch to main repo because you have no write permission of that repository.
  3. create a pull request from your fork repository should display correct UI. It shows https://gitea.com/gitea/tea/compare/master...strk:master , it's right. don't know why you get https://gitea.com/gitea/tea/compare/master...master
@lunny commented on GitHub (Jun 3, 2019): 2. You have a fork so that you cannot fork it twice, but I think it's not right that you could fork it to another organization. This should be improved. 3. You have no permission to push a branch to main repo because you have no write permission of that repository. 4. create a pull request from your fork repository should display correct UI. It shows https://gitea.com/gitea/tea/compare/master...strk:master , it's right. don't know why you get https://gitea.com/gitea/tea/compare/master...master
Author
Owner

@strk commented on GitHub (Jun 3, 2019):

I probably forked before I was made an owner, or something like that.
Why I shouldn't have been able to fork to another organization ? That's my typical approach: fork to under my own name.

I get the master...master link if I go to "Pull requests" from the main repo, not from my fork (I didn't try my fork before).

@strk commented on GitHub (Jun 3, 2019): I probably forked _before_ I was made an owner, or something like that. Why I shouldn't have been able to fork to another organization ? That's my typical approach: fork to under my own name. I get the master...master link if I go to "Pull requests" from the main repo, not from my fork (I didn't try my fork before).
Author
Owner

@lafriks commented on GitHub (Jun 3, 2019):

You should be able to fork repositories from organization to your own user...

@lafriks commented on GitHub (Jun 3, 2019): You should be able to fork repositories from organization to your own user...
Author
Owner

@lunny commented on GitHub (Jun 3, 2019):

@lafriks I think github allows user fork himself repositories to organizations.

@lunny commented on GitHub (Jun 3, 2019): @lafriks I think github allows user fork himself repositories to organizations.
Author
Owner

@lunny commented on GitHub (Jun 3, 2019):

@strk so when you click the New Pull Request button a main repository on github.com, it has the same behavior with gitea. You should click the button on your fork repository.

@lunny commented on GitHub (Jun 3, 2019): @strk so when you click the `New Pull Request` button a main repository on github.com, it has the same behavior with gitea. You should click the button on your fork repository.
Author
Owner

@strk commented on GitHub (Jun 4, 2019):

@lunny github has a "compare across forks" link right above the selector. Clicking that link adds a "fork selector" pull-down menu.

@strk commented on GitHub (Jun 4, 2019): @lunny github has a "compare across forks" link right above the selector. Clicking that link adds a "fork selector" pull-down menu.
Author
Owner

@strk commented on GitHub (Jun 6, 2019):

BTW, the version of Gitea we're running (1.5) does NOT have a way to create a pull request from your fork repository, or I cannot find it

@strk commented on GitHub (Jun 6, 2019): BTW, the version of Gitea we're running (1.5) does NOT have a way to `create a pull request from your fork repository`, or I cannot find it
Author
Owner

@lunny commented on GitHub (Jun 10, 2019):

@strk v1.5 is too old

@lunny commented on GitHub (Jun 10, 2019): @strk v1.5 is too old
Author
Owner

@stale[bot] commented on GitHub (Aug 9, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 9, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3416