-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create repository as owner for a specific organisation #20643
Comments
Check that organization directory is lowercase where repositories are created |
hi, just check and it is. For clarification |
Correction: the minimal reproducible example works. As the instance was being stripped back I kept trying to see at what point it "worked". The browser cache gave the false sense of "not working" while I was stripping back. This means some interaction cleared this fault but relying on "deleting" isn't a good way... I will start stripping back again to create a real demonstrable instance |
Please try this instance |
Also seeing this issue in our env after upgrading to 1.17.0 from 1.15.10, running with container and PostgreSQL. I could verify all of eeyrjmr's observations:
Plus I'm quite sure I could create an org repo as an owner after the upgrade in one case, which is now no longer working. So there might still be other circumstances that have impact on this. |
From what I see in the logs:
This is probably the code in gitea/models/organization/org_user.go Lines 76 to 84 in d81e31a
When executing this query manually, I get an empty result, obviously because the
This is the case for many Owners groups, though not all:
Should this flag be true on the Owners groups or is this irrelevant due to some hard coded permission elsewhere for this group? |
So to further isolate the problem, I did these steps:
|
We also have at least one org for which members of the 'owners' team seemingly can't create new repositories. |
Hello, same problem for me, probably since upgrade to 1.17.0 |
OK. The bug is when updating owners team, the incorrect update to can_create_org_repo false. I will send a PR to fix that. |
I don't think this issue is fixed... For me after upgrading from 1.16.x to 1.17.1 had still issues with lot of owner teams |
1.17.1 doesn't automatically fix orgs affected You need to goto the "owner" team's settings and press "update settings" (no need to change anything) Whether there is a way todo this to all orgs (especially large instances) is a different questipn |
I know, I had to fix this for 70 organizations 😁 manually updated in database with sql |
Eeks :( I wonder if the API can help :( |
Ideally this should be fixed by migration but we are too late for that in 1.17 release, probably migration for 1.18 + doctor command to fix this |
I will reopen this as this still can be a problem to many |
You don't need to update them once, you can update one when you find it wrong. :) |
Hi, * have the same issue, but updating owners don't work for me. |
This also blocks transfer of repositories as this checks for "create permissions": Lines 83 to 100 in 1d8543e
I temporary worked around by creating a temporary team with create permissions and adding myself to it. |
Once you updated 1.17.1, edit the team information then this team's permission should be recovered. |
Also hit this bug, I worked around via SQL: update team set can_create_org_repo=true where name='Owners'; Maybe we should add a migration with that? As I understand it, every "Owners" team should have this permission as it's not configurable on the UI. |
Yes, migration and doctor fix would be nice for this |
We had a 103 orgs not able to create repos, so a bit of an inconvenience. I had to do this in mysql to fix at least for owners:
|
Oops, I see @silverwind already made a similar comment. |
Or maybe we can ignore the check when it's an owner team? |
I'm having this issue on the latest Gitea release. I have a gitea instance with two users (an 'admin' user that I use rarely, and another user that I normally use) and one organisation ('mirrors', which I use for mirroring external repos). Edit: Correction, going to the organisation settings, clicking 'teams', clicking the title of the 'owners' team and then clicking update did in fact fix the issue. |
This trick works for me. Thanks! |
Recently did an update that jumped from quite an old version up past 1.17 - and this was what worked for us. Thanks @Maffsie! |
finally ! thanks for that one. It works that way now! using gitea 1.19.4 (Org -> tab "Teams" -> click "owners" team title -> Settings -> click "Update Settings") |
Description
Post upgrading a server to 1.17.0 (from 1.16.8) the ability to create repositories for one specific organisation became forbidden for owners.
a gitea dump was performed from the windows machine and reproduced on a linux machine. More so the entire gitea instance was stripped right back to a minimal reproducible instance.
console log:
url attempting to access:
http://localhost:3000/repo/create?org=2
gitea-dump-1659476345.zip
username: j
password: qwertyuiop
admin: administrator
password: qwertyuiop
Gitea Version
1.17.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.35.1
Operating System
windows ( and linux)
How are you running Gitea?
windows service or from a sh
Database
MySQL
The text was updated successfully, but these errors were encountered: