From aead04bae050567f53be2588bcf72f53f53219d7 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Fri, 17 Feb 2023 15:30:55 -0700 Subject: [PATCH] Add sleep hack for gitea --- gitea/initialize-gitea.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gitea/initialize-gitea.sh b/gitea/initialize-gitea.sh index ef178a4..1287e4a 100755 --- a/gitea/initialize-gitea.sh +++ b/gitea/initialize-gitea.sh @@ -24,6 +24,8 @@ if [[ $? == 1 ]] ; then # Then create if it wasn't found ${compose_command} exec --user git server gitea admin user create --admin --username ${GITEA_USER} --password ${GITEA_PASSWORD} --email ${GITEA_USER_EMAIL} fi +# HACK: sleep a bit because if we don't gitea will return empty responses +sleep 5 # Check if the token already exists token_response=$( curl -s "${GITEA_URL_PREFIX}/api/v1/users/${GITEA_USER}/tokens" \ -u ${GITEA_USER}:${GITEA_PASSWORD} \