Create new repo with API from template

Hi, how do i create a new repo (via curl preferably) using a ‘Template’ and for it to also include ‘Git Content (Default Branch)’?

my first attempt with

curl -X POST "https://my-gitea-server/api/v1/user/repos?access_token=$TOKEN" -H "accept: application/json" -H "content-type: application/json" -d "{\"name\":\"test\", \"template\":\"me/my_template\" }"

only created a new empty repo called ‘test’.



Generating from a template is not currently supported by the API unfortunately. :slightly_frowning_face:

I have added it to the list at

ah… that would explain it! thanks… can’t wait for this feature :slight_smile: