Skip to content

Commit 40621bf

Browse files
Merge pull request #653 from tillig/feature/fix-apm-install
Enable SSH timeout to fallback to HTTP.
2 parents 53cdee3 + 8a7fa58 commit 40621bf

6 files changed

Lines changed: 409 additions & 334 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
- Pin codex setup to `rust-v0.118.0` for security and reproducibility; update config to `wire_api = "responses"` (#663)
1818
- Propagate headers and environment variables through OpenCode MCP adapter with defensive copies to prevent mutation (#622)
19+
- Fix `apm install` hanging indefinitely when corporate firewalls silently drop SSH packets by setting `GIT_SSH_COMMAND` with `ConnectTimeout=30` (#652)
1920
- Fix `apm compile --target claude` silently skipping dependency instructions stored in `.github/instructions/` (#631)
21+
2022
### Changed
2123

2224
- `apm marketplace browse/search/add/update` now route through the registry proxy when `PROXY_REGISTRY_URL` is set; `PROXY_REGISTRY_ONLY=1` blocks direct GitHub API calls (#506)
@@ -453,7 +455,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
453455

454456
### Fixed
455457

456-
- **Install Script and `apm update`**: Repaired corrupted header in install.sh. Use awk instead of sed for shell subprocess compatibility. Directed shell output to terminal for password input during update process.
458+
- **Install Script and `apm update`**: Repaired corrupted header in install.sh. Use awk instead of sed for shell subprocess compatibility. Directed shell output to terminal for password input during update process.
457459

458460
## [0.7.1] - 2025-01-22
459461

@@ -495,7 +497,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
495497

496498
- **SKILL.md as first-class primitive**: meta-description of what an APM Package does for agents to read
497499
- **Claude Skills Installation**: Install Claude Skills directly as APM Packages
498-
- **Bidirectional Format Support**:
500+
- **Bidirectional Format Support**:
499501
- APM packages → SKILL.md (for Claude target)
500502
- Claude Skills → .agent.md (for VSCode target)
501503
- **Skills Documentation**: New `docs/skills.md` guide
@@ -512,7 +514,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
512514

513515
- **Target Auto-Detection**: Smart compilation based on project structure
514516
- `.github/` only → generates `AGENTS.md` + VSCode integration
515-
- `.claude/` only → generates `CLAUDE.md` + Claude integration
517+
- `.claude/` only → generates `CLAUDE.md` + Claude integration
516518
- Both folders → generates all formats
517519
- Neither folder → generates `AGENTS.md` only (universal format)
518520

docs/src/content/docs/getting-started/authentication.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,9 @@ git config credential.helper # check current helper
281281
git config --global credential.helper osxkeychain # macOS
282282
gh auth login # GitHub CLI
283283
```
284+
285+
### SSH connection hangs on corporate/VPN networks
286+
287+
When no token is available, APM tries SSH before falling back to plain HTTPS. Firewalls that silently drop SSH packets (port 22) can make `apm install` appear to hang. APM sets `GIT_SSH_COMMAND="ssh -o ConnectTimeout=30"` so SSH attempts fail within 30 seconds and the fallback proceeds to HTTPS with git credential helpers.
288+
289+
If you already set `GIT_SSH_COMMAND` (e.g., for a custom key), APM appends `-o ConnectTimeout=30` unless `ConnectTimeout` is already present in your value.

packages/apm-guide/.apm/skills/apm-usage/authentication.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,15 @@ apm install --verbose your-org/package
9696
# Increase git credential timeout (default 30s, max 180s)
9797
export APM_GIT_CREDENTIAL_TIMEOUT=120
9898
```
99+
100+
### SSH connection hangs on corporate/VPN networks
101+
102+
APM tries SSH as a fallback when HTTPS auth is not available. On networks
103+
that silently drop SSH traffic (port 22), this can appear to hang. APM sets
104+
`GIT_SSH_COMMAND="ssh -o ConnectTimeout=30"` so SSH attempts fail within
105+
30 seconds and the fallback chain continues to plain HTTPS with git
106+
credential helpers.
107+
108+
To override the SSH command (e.g., custom key path), set `GIT_SSH_COMMAND`
109+
in your environment. APM appends `-o ConnectTimeout=30` unless it finds
110+
`ConnectTimeout` already present in your value.

0 commit comments

Comments
 (0)