From 863b340622ffd1283eb05a02ee0731ab2888ff54 Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 23 Nov 2023 17:02:36 +0100 Subject: [PATCH] Update dev notes with create repo curl cmd --- docs/unsure-where-to-put/dev-notes.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/unsure-where-to-put/dev-notes.md b/docs/unsure-where-to-put/dev-notes.md index 67a8392dcc..9df5c4891e 100644 --- a/docs/unsure-where-to-put/dev-notes.md +++ b/docs/unsure-where-to-put/dev-notes.md @@ -36,9 +36,31 @@ TAGS="sqlite" make build generate-swagger # launch local -``` +```bash +# create a user ./gitea admin user create --name me --password me --email "buero@meissa.de" + +# create a token ./gitea admin user generate-access-token -u me -t token --scopes write:activitypub,write:repository,write:user + +# create a repo +curl -X 'POST' \ + 'http://localhost:3000/api/v1/user/repos?token=ReplaceThisWithYourGeneratedToken' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "auto_init": false, + "default_branch": "main", + "description": "none", + "gitignores": "none", + "issue_labels": "", + "license": "apache", + "name": "repo", + "private": true, + "readme": "This is a readme", + "template": false, + "trust_model": "default" +}' ``` # sync base branch