| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3371e0e commit 7d424ae
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,20 +102,25 @@ while :; do | |||
| 102 | 102 | I=$((I+5)) | |
| 103 | 103 | [ "$I" -lt 120 ] || fatal "timed out" | |
| 104 | 104 | done | |
| 105 | - sleep 5 | ||
| 106 | 105 | ||
| 107 | 106 | # Get the token | |
| 108 | 107 | log "Getting GitLab token..." | |
| 109 | - TOKEN_JSON=$( | ||
| 110 | - try curl -s http://localhost:8080/api/v3/session \ | ||
| 111 | - -X POST \ | ||
| 112 | - --data "login=$LOGIN&password=$PASSWORD" | ||
| 113 | - ) || exit 1 | ||
| 114 | - TOKEN=$( | ||
| 115 | - pecho "${TOKEN_JSON}" | | ||
| 116 | - try python -c \ | ||
| 117 | - 'import sys, json; print(json.load(sys.stdin)["private_token"])' | ||
| 118 | - ) || exit 1 | ||
| 108 | + I=0 | ||
| 109 | + while :; do | ||
| 110 | + sleep 1 | ||
| 111 | + TOKEN_JSON=$( | ||
| 112 | + try curl -s http://localhost:8080/api/v3/session \ | ||
| 113 | + -X POST \ | ||
| 114 | + --data "login=$LOGIN&password=$PASSWORD" | ||
| 115 | + ) >/dev/null 2>&1 || true | ||
| 116 | + TOKEN=$( | ||
| 117 | + pecho "${TOKEN_JSON}" | | ||
| 118 | + try python -c \ | ||
| 119 | + 'import sys, json; print(json.load(sys.stdin)["private_token"])' | ||
| 120 | + ) >/dev/null 2>&1 && break | ||
| 121 | + I=$((I+1)) | ||
| 122 | + [ "$I" -lt 20 ] || fatal "timed out" | ||
| 123 | + done | ||
| 119 | 124 | ||
| 120 | 125 | cat > $CONFIG << EOF | |
| 121 | 126 | [global] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments