Commit 9a03e44
authored
fix(setup): retry-with-backoff git clones, force HTTPS for setup deps (#84)
Two failure modes hit during a fresh end-to-end install:
1. `gh repo clone` constructs the underlying `git clone` URL based on the
user's gh `Git operations protocol` setting. Users with `ssh` set
(often by older interactive logins) and no SSH key registered hit a
cryptic `Permission denied (publickey)` on every plugin clone.
2. GitHub HTTP/2 returns transient 500s during setup runs ("error: RPC
failed; HTTP 500"). A single attempt with no retry leaves the user
to delete partial clones and re-run. The same URL succeeds seconds
later, and HTTP/1.1 dodges the issue entirely.
Add `git_clone_with_retry` (lib/common.sh) that:
- Pins `http.version=HTTP/1.1` on the per-invocation git config.
- Sets `url.https://github.com/.insteadOf=git@github.com:` so SSH-style
URLs (whether explicit or constructed by gh) get rewritten transparently.
- Retries with exponential backoff (3 attempts: 2s, 4s, 8s), cleaning up
the partial directory between attempts.
- Forwards extra args (used for `--depth 1` from the skills installer).
Wire it into:
- `install_plugin` (lib/wordpress.sh) — drops the gh-vs-git branching;
plain `git_clone_with_retry` covers public github.com, GitHub
Enterprise, and any HTTPS git host. (gh remains used elsewhere for
issue/PR work where its auth helper actually matters.)
- `install_skills_from_repo` (lib/skills.sh) — same path, same
resilience for the WordPress + Data Machine skills bundles cloned
during Phase 8.5.
Closes #831 parent 9c7ff4b commit 9a03e44
3 files changed
Lines changed: 45 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 34 | + | |
| 35 | + | |
44 | 36 | | |
45 | 37 | | |
46 | 38 | | |
| |||
0 commit comments