@@ -204,7 +204,6 @@ services:
204204 condition : service_healthy
205205 environment :
206206 - GITLAB_ROOT_PASSWORD=${GITLAB_ROOT_PASSWORD:-;asiweml@562}
207- - GITLAB_OMNIBUS_CONFIG=gitlab_rails['initial_root_password'] = ENV['GITLAB_ROOT_PASSWORD']; gitlab_rails['gitlab_signup_enabled'] = false; gitlab_rails['allow_local_requests_from_web_hooks_and_services'] = true;
208207 entrypoint : /bin/sh
209208 command :
210209 - -c
@@ -218,7 +217,10 @@ services:
218217
219218 # Use OAuth2 password grant to get access token
220219 OAUTH_RESPONSE=$$(curl -s -X POST http://gitlab:80/oauth/token \
221- -d "grant_type=password&username=root&password=$$GITLAB_ROOT_PASSWORD&scope=api")
220+ --data-urlencode "grant_type=password" \
221+ --data-urlencode "username=root" \
222+ --data-urlencode "password=$$GITLAB_ROOT_PASSWORD" \
223+ --data-urlencode "scope=api")
222224 echo "OAuth response: $$OAUTH_RESPONSE"
223225
224226 OAUTH_TOKEN=$$(echo "$$OAUTH_RESPONSE" | grep -o '"access_token":"[^"]*"' | cut -d'"' -f4)
@@ -230,7 +232,7 @@ services:
230232 PAT_RESPONSE=$$(curl -s -X POST http://gitlab:80/api/v4/users/1/personal_access_tokens \
231233 -H "Authorization: Bearer $$OAUTH_TOKEN" \
232234 -H "Content-Type: application/json" \
233- -d '{"name":"bootstrap","scopes":["api","read_user","read_repository","write_repository"],"expires_at":"2027-01-01" }')
235+ -d '{"name":"bootstrap","scopes":["api","read_user","read_repository","write_repository"]}')
234236 echo "PAT response: $$PAT_RESPONSE"
235237
236238 TOKEN=$$(echo "$$PAT_RESPONSE" | grep -o '"token":"[^"]*"' | cut -d'"' -f4)
0 commit comments