setting ENABLE_PUSH_CREATE_ORG - appears to have no effect #5799

Closed
opened 2025-11-02 06:36:21 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @voobscout on GitHub (Jul 28, 2020).

  • Gitea version (or commit ref): 1.12.2
  • Git version: 2.27.0
  • Operating system: NixOS
  • 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

Relevant part of the ini

[repository]
ENABLE_PUSH_CREATE_ORG  = true
ENABLE_PUSH_CREATE_USER = true

Now, let's try and auto-create org/repo on push

git remote add gitea-remote-new-org gitea@my.git.fqdn:neworgname/reponame.git
git push -u --set-upstream gitea-remote-new-org master

Unfortunately, the result is

Unable to get owner: neworgname user does not exist [uid: 0, name: neworgname, keyid: 0]

However, this works:

git remote add gitea-remote-existing-org gitea@my.git.fqdn:existingorgname/reponame.git
git remote add gitea-remote-existing-user gitea@my.git.fqdn:existinguser/reponame.git
git push -u gitea-remote-existing-org master
git push -u gitea-remote-existing-user master

Imho, I miss knowledge/expertise, misunderstand the purpose of ENABLE_PUSH_CREATE or a bug has been discovered.
In case, the purpose of those switches are granular control, ie, already existing user/organization namespaces and absent repos, then this is likely a feature request.

Desired result - whatever is pushed to gitea should auto-create namespaces, provided the user has enough permissions.
Any advise/comment is much appreciated!

Originally created by @voobscout on GitHub (Jul 28, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) 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.12.2 - Git version: 2.27.0 - Operating system: NixOS - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description Relevant part of the ini ```ini [repository] ENABLE_PUSH_CREATE_ORG = true ENABLE_PUSH_CREATE_USER = true ``` Now, let's try and auto-create org/repo on push ```bash git remote add gitea-remote-new-org gitea@my.git.fqdn:neworgname/reponame.git git push -u --set-upstream gitea-remote-new-org master ``` Unfortunately, the result is ``` Unable to get owner: neworgname user does not exist [uid: 0, name: neworgname, keyid: 0] ``` **However**, this works: ```bash git remote add gitea-remote-existing-org gitea@my.git.fqdn:existingorgname/reponame.git git remote add gitea-remote-existing-user gitea@my.git.fqdn:existinguser/reponame.git git push -u gitea-remote-existing-org master git push -u gitea-remote-existing-user master ``` Imho, I miss knowledge/expertise, misunderstand the purpose of ENABLE_PUSH_CREATE or a bug has been discovered. In case, the purpose of those switches are granular control, ie, already existing user/organization namespaces and absent repos, then this is likely a feature request. Desired result - whatever is pushed to gitea should auto-create namespaces, provided the user has enough permissions. Any advise/comment is much appreciated! <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/question label 2025-11-02 06:36:21 -06:00
Author
Owner

@zeripath commented on GitHub (Jul 28, 2020):

PUSH_CREATE_ORG allows you to create repositories for an existing organizations. It cannot just create organizations.

Similarly PUSH_CREATE_USER allows you to create repositories for existing users themselves.

@zeripath commented on GitHub (Jul 28, 2020): PUSH_CREATE_ORG allows you to create repositories for an existing organizations. It cannot just create organizations. Similarly PUSH_CREATE_USER allows you to create repositories for existing users themselves.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5799