# Mirror a repo in an organisation

**URL:** <https://forum.gitea.com/t/mirror-a-repo-in-an-organisation/7188>\
**Category:** Gitea Usages\
**Created:** [April 30, 2023, 10:53am UTC](https://forum.gitea.com/t/mirror-a-repo-in-an-organisation/7188 "2023-04-30T10:53:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianread108](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/brianread108/32/5210_2.png) [@brianread108](https://forum.gitea.com/u/brianread108)\
**Post date:** [April 30, 2023, 10:53am UTC](https://forum.gitea.com/t/mirror-a-repo-in-an-organisation/7188/1 "2023-04-30T10:53:16Z")

</div>

How do I specify in the API that I want a mirrored repo to be created inside a local copy of the organisation in which the repo is remotely?

---

<div class="post-metadata">

**Author:** ![jake](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jake](https://forum.gitea.com/u/jake)\
**Post date:** [May 1, 2023, 6:33pm UTC](https://forum.gitea.com/t/mirror-a-repo-in-an-organisation/7188/2 "2023-05-01T18:33:53Z")

</div>

I looked through the API docs and don’t think there’s a way to create a mirror via the API. You could look into the ‘private’ API which is what the UI uses to create mirrors or manually crafting SQL queries, but it’s liable to change between versions.

I couldn’t find a specific feature request for your use case, so feel free to create one on GitHub.  
Slightly related feature request: [Update "Clone From URL" mirror\_address via API · Issue #16005 · go-gitea/gitea · GitHub](https://github.com/go-gitea/gitea/issues/16005)  
Slightly related forum post: [How to deactivate the mirroring of a repository with the api](https://forum.gitea.com/t/how-to-deactivate-the-mirroring-of-a-repository-with-the-api/6870) (same answer as above unfortunately)

---

<div class="post-metadata">

**Author:** ![brianread108](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/brianread108/32/5210_2.png) [@brianread108](https://forum.gitea.com/u/brianread108)\
**Post date:** [May 2, 2023, 6:01am UTC](https://forum.gitea.com/t/mirror-a-repo-in-an-organisation/7188/3 "2023-05-02T06:01:39Z")

</div>

Thanks for youre response.

I’ve submitted an NFR:

> <https://github.com/go-gitea/gitea/issues/24480>
>
> \### Feature Description
> 
> As per this conversation:
> https://forum.gitea.com/t…/mirror-a-repo-in-an-organisation/7188
> 
> There is no way to mirror a repo which is part of an organisation remotely in the same named organisation locally.
> 
> Our use case is that we (will) have about 400 repos split between two organisations (base and extras), and would like to be able to mirror the exact structure locally for our developers.
> 
> Thus anyone who is working on a particular repo or set of them will need to clone/pull locally first, adding to the work load, and risking wasted time working on an old copy.
> 
> The API allows a local mirror to only be under a specific user.
> 
> \### Screenshots
> 
> \_No response\_
