possibility to keep repository AccessMode after transfert #10438

Open
opened 2025-11-02 09:07:23 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @cclecle on GitHub (Mar 15, 2023).

Feature Description

In CI/CD context, I am automatizing repository creation using a specific Jenkins task (that could apply to any other system as long as it is through REST API).

Long story short, this is the workflow:

  • get template repository from gitea
  • create a new one with parameters
  • create acossiated jenkins tasks
  • transfer the repos to end-user

Problem is that jenkins pipeline is using a "bot" user to communicate with gitea.
So, as soon as the repository is transfered to end-user, it is loosing rights on it and the CI/CD tasks associated with it are not working anymore.

I see no way to fix it on Jenkins side, since I dont want jenkins to use the end-user account.

But on Gitea side I see 2 possible ways:
1/ Add an option on /repos/{owner}/{repo}/transfer API call to decide which AccessMode should be set to the previous owner after transfer accepted.
2/ Being able to add an AccessMode for a user, even if he is also the owner.

Am I missing something ?

Note: using gitea 1.19.0-rc1

Screenshots

No response

Originally created by @cclecle on GitHub (Mar 15, 2023). ### Feature Description In CI/CD context, I am automatizing repository creation using a specific Jenkins task (that could apply to any other system as long as it is through REST API). Long story short, this is the workflow: - get template repository from gitea - create a new one with parameters - create acossiated jenkins tasks - transfer the repos to end-user Problem is that jenkins pipeline is using a "bot" user to communicate with gitea. So, as soon as the repository is transfered to end-user, it is loosing rights on it and the CI/CD tasks associated with it are not working anymore. I see no way to fix it on Jenkins side, since I dont want jenkins to use the end-user account. But on Gitea side I see 2 possible ways: 1/ Add an option on /repos/{owner}/{repo}/transfer API call to decide which AccessMode should be set to the previous owner after transfer accepted. 2/ Being able to add an AccessMode for a user, even if he is also the owner. Am I missing something ? Note: using gitea 1.19.0-rc1 ### Screenshots _No response_
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 09:07:23 -06:00
Author
Owner

@cclecle commented on GitHub (Mar 16, 2023):

I manage to make it work using two different users:

  • one for generic CI/CD tasks
  • one dedicated to new repository creation based on template one

Not perfect but at least I am unlocked !
Would be nice to have a way to do it with only one user tho.

@cclecle commented on GitHub (Mar 16, 2023): I manage to make it work using two different users: - one for generic CI/CD tasks - one dedicated to new repository creation based on template one Not perfect but at least I am unlocked ! Would be nice to have a way to do it with only one user tho.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10438