diff --git a/forgejo.sh b/forgejo.sh index 43f9790..3c706ae 100755 --- a/forgejo.sh +++ b/forgejo.sh @@ -52,7 +52,7 @@ function setup() { else wait_for docker exec --user 1000 forgejo forgejo admin user create --admin --username "$user" --password "$password" --email "$user@example.com" fi - docker exec --user 1000 forgejo forgejo admin user generate-access-token -u $user --raw > forgejo-token + docker exec --user 1000 forgejo forgejo admin user generate-access-token -u $user --raw --scopes 'all,sudo' > forgejo-token ( echo -n 'Authorization: token ' ; cat forgejo-token ) > forgejo-header ( echo "#!/bin/sh" ; echo 'curl -sS -H "Content-Type: application/json" -H @'$(pwd)/forgejo-header' "$@"' ) > forgejo-api && chmod +x forgejo-api }