fix: bug: setup_forge reachability check uses unauthenticated curl against /api/v1/version, fails on REQUIRE_SIGNIN_VIEW=true forgejos (#581)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7c8f734d6c
commit
c753bebb14
1 changed files with 2 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ setup_forge() {
|
||||||
echo "── Forge setup ────────────────────────────────────────"
|
echo "── Forge setup ────────────────────────────────────────"
|
||||||
|
|
||||||
# Check if Forgejo is already running
|
# Check if Forgejo is already running
|
||||||
if curl -sf --max-time 5 "${forge_url}/api/v1/version" >/dev/null 2>&1; then
|
if curl -sf --max-time 5 -H "Authorization: token ${FORGE_TOKEN:-}" "${forge_url}/api/v1/version" >/dev/null 2>&1; then
|
||||||
echo "Forgejo: ${forge_url} (already running)"
|
echo "Forgejo: ${forge_url} (already running)"
|
||||||
else
|
else
|
||||||
echo "Forgejo not reachable at ${forge_url}"
|
echo "Forgejo not reachable at ${forge_url}"
|
||||||
|
|
@ -94,7 +94,7 @@ setup_forge() {
|
||||||
# Wait for Forgejo to become healthy
|
# Wait for Forgejo to become healthy
|
||||||
echo -n "Waiting for Forgejo to start"
|
echo -n "Waiting for Forgejo to start"
|
||||||
local retries=0
|
local retries=0
|
||||||
while ! curl -sf --max-time 3 "${forge_url}/api/v1/version" >/dev/null 2>&1; do
|
while ! curl -sf --max-time 3 -H "Authorization: token ${FORGE_TOKEN:-}" "${forge_url}/api/v1/version" >/dev/null 2>&1; do
|
||||||
retries=$((retries + 1))
|
retries=$((retries + 1))
|
||||||
if [ "$retries" -gt 60 ]; then
|
if [ "$retries" -gt 60 ]; then
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue