How can I create repos from a command script on a remote system (http or ssh?)

as for subject.

We have a few hundred repos to create and would like to make sure that are all created correctly!

You can use Gitea’s API to create repositories for a user or for an organization (note: this is documentation for development version, you can visit the same /api/… URL on your instance for your version of Gitea’s documentation).

1 Like

Thanks, I’ve found that now, and am trying the swagger “Try it out” interface. However I keep getting an “505 Internal Server Error” when I try and access /api/v1/user/repos, and use these parameters:

“auto_init”: true,
“default_branch”: “master”,
“description”: “a descr”,
“gitignores”: “”,
“issue_labels”: “”,
“license”: “”,
“name”: “testrepo”,
“private”: true,
“readme”: “Hello World”,
“template”: false,
“trust_model”: “default”

I’ve got the token sorted.

Seems to be the Private parameter. “False” works and “True” gives an internal Server error.

… .and also “auto_init” true gives me the Internal Server Error.

I think auto_init being set to true and other parameters like gitignores, issue_labels and license being empty may be why it errors. As for private, not sure why that causes an error.

I would file an issue Issues · go-gitea/gitea · GitHub for those so the developers can take a look at it.