Repository navigation
fix: explain SSH publickey failures when installing git dependencies - #15877
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds SSH public-key troubleshooting guidance to Git fetch and resolution errors. For supported SSH references, resolver errors can also suggest a local HTTPS rewrite without changing the recorded URL. ChangesSSH Git dependency guidance
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Assessment against linked issues
Suggested labels: Suggested reviewers: Merge Risk: ⚪ Minimal · up to The diagnostic changes appear mergeable after normal checks. They add troubleshooting guidance without changing the recorded Git URL. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 3 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
pnpm11/resolving/git-resolver/test/index.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15877 +/- ##
=======================================
Coverage 92.02% 92.03%
=======================================
Files 1479 1479
Lines 199084 199160 +76
=======================================
+ Hits 183210 183288 +78
+ Misses 15874 15872 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked-workspace scenario compares current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.4511896090999996,
"stddev": 0.16235797425995785,
"median": 2.3975524933,
"user": 1.334542,
"system": 1.4384089399999997,
"min": 2.2748835157999996,
"max": 2.6955006077999997
},
{
"command": "pacquet@main",
"mean": 2.3173299628999997,
"stddev": 0.0684842705825905,
"median": 2.2889380418,
"user": 1.2748781999999999,
"system": 1.37104834,
"min": 2.2639100778,
"max": 2.4598963888
},
{
"command": "pnpr@HEAD",
"mean": 1.443199676,
"stddev": 0.11316131085832645,
"median": 1.4483446618000002,
"user": 1.1754159999999998,
"system": 1.2047627399999998,
"min": 1.3068304338,
"max": 1.6346314898
},
{
"command": "pnpr@main",
"mean": 1.4758660446,
"stddev": 0.12450183493257336,
"median": 1.4679155263,
"user": 1.1516969,
"system": 1.22066234,
"min": 1.3226273348000002,
"max": 1.6303305678
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.23368639634000005,
"stddev": 0.012273172466894123,
"median": 0.23053068914000002,
"user": 0.24069787999999998,
"system": 0.59205916,
"min": 0.21844949564000002,
"max": 0.25266461564000003
},
{
"command": "pacquet@main",
"mean": 0.22955866494000002,
"stddev": 0.007465245185081551,
"median": 0.23091461963999999,
"user": 0.23770688,
"system": 0.5836286599999999,
"min": 0.21260161664000002,
"max": 0.23773072764
},
{
"command": "pnpr@HEAD",
"mean": 0.25221002504,
"stddev": 0.007996929453266174,
"median": 0.25259783014000003,
"user": 0.25220728000000003,
"system": 0.57837916,
"min": 0.23947780264000001,
"max": 0.26206837164
},
{
"command": "pnpr@main",
"mean": 0.30876506784,
"stddev": 0.08633449435034507,
"median": 0.27595622414,
"user": 0.32645757999999997,
"system": 0.69241806,
"min": 0.22558072364,
"max": 0.44057618364
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009077004268115946,
"stddev": 0.0025476427032032124,
"median": 0.0075730751,
"user": 0.005073998260869565,
"system": 0.00446480295652174,
"min": 0.0066985361,
"max": 0.0159645011
},
{
"command": "pacquet@main",
"mean": 0.014217689494088671,
"stddev": 0.0015378320959674163,
"median": 0.014147306100000001,
"user": 0.007682703251231522,
"system": 0.007201643251231528,
"min": 0.009410472100000001,
"max": 0.0193230221
},
{
"command": "pnpr@HEAD",
"mean": 0.011802448033014357,
"stddev": 0.003349294041282374,
"median": 0.012787095100000001,
"user": 0.006558120956937795,
"system": 0.005828967942583731,
"min": 0.0067053881,
"max": 0.018969520099999998
},
{
"command": "pnpr@main",
"mean": 0.007449767271686743,
"stddev": 0.00037471806001703216,
"median": 0.0074362291,
"user": 0.004477263373493976,
"system": 0.003383707951807228,
"min": 0.006682155100000001,
"max": 0.0113570531
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.00842206244189781,
"stddev": 0.0009430197755012767,
"median": 0.00818299342,
"user": 0.004558280583941608,
"system": 0.004359446715328466,
"min": 0.007513387920000001,
"max": 0.013585211920000001
},
{
"command": "pacquet@main",
"mean": 0.008449452479440563,
"stddev": 0.000920148396375983,
"median": 0.00816877992,
"user": 0.00474695216783217,
"system": 0.004193528811188812,
"min": 0.007498988920000001,
"max": 0.013416285920000002
},
{
"command": "pnpr@HEAD",
"mean": 0.008484458970387595,
"stddev": 0.0009457758649528814,
"median": 0.008223942420000002,
"user": 0.005013701395348838,
"system": 0.0039691487596899225,
"min": 0.00747752592,
"max": 0.013314392920000001
},
{
"command": "pnpr@main",
"mean": 0.008351847698169015,
"stddev": 0.000935436732267469,
"median": 0.00810666592,
"user": 0.004597697464788732,
"system": 0.004224207676056343,
"min": 0.0073907919200000005,
"max": 0.013429217920000002
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6554472487600007,
"stddev": 0.13050995839067456,
"median": 2.61854614296,
"user": 2.22620784,
"system": 2.0480011399999998,
"min": 2.58176577596,
"max": 3.02312424396
},
{
"command": "pacquet@main",
"mean": 2.6159568395600004,
"stddev": 0.02753470915260276,
"median": 2.6123882179600004,
"user": 2.15333594,
"system": 1.97731024,
"min": 2.58677490196,
"max": 2.68474782496
},
{
"command": "pnpr@HEAD",
"mean": 1.5798063029600002,
"stddev": 0.13042668101872193,
"median": 1.5177411809599999,
"user": 1.30842634,
"system": 1.6122522399999997,
"min": 1.44953165096,
"max": 1.76067561796
},
{
"command": "pnpr@main",
"mean": 1.62881473236,
"stddev": 0.14355606717487235,
"median": 1.6381285354600001,
"user": 1.3937922399999998,
"system": 1.72299114,
"min": 1.43456219696,
"max": 1.8270687999600002
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
Confirmation (reversed target order)
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.50076206276,
"stddev": 0.045341355978695236,
"median": 0.50532024706,
"user": 0.7208056599999999,
"system": 0.77577508,
"min": 0.39663108706000005,
"max": 0.56661600206
},
{
"command": "pacquet@main",
"mean": 0.43295795856,
"stddev": 0.020997813601359917,
"median": 0.43969273206000004,
"user": 0.5985760600000001,
"system": 0.73534258,
"min": 0.38970629306000004,
"max": 0.45385599006000005
},
{
"command": "pnpr@HEAD",
"mean": 0.30913468086000007,
"stddev": 0.02474461143759625,
"median": 0.30110419406000005,
"user": 0.26013176,
"system": 0.5995318799999999,
"min": 0.27152469906000004,
"max": 0.34520420506000005
},
{
"command": "pnpr@main",
"mean": 0.28562325595999993,
"stddev": 0.007865132617090466,
"median": 0.28556861156,
"user": 0.24403936,
"system": 0.5392860799999999,
"min": 0.27410096506000003,
"max": 0.29731845906000004
}
],
"confirmation": {
"results": [
{
"command": "pnpr@main",
"mean": 0.2833644313,
"stddev": 0.007360118350748373,
"median": 0.28629437450000006,
"user": 0.23864601999999996,
"system": 0.5500149999999999,
"min": 0.2669829065,
"max": 0.28851669350000003
},
{
"command": "pnpr@HEAD",
"mean": 0.2867073291000001,
"stddev": 0.006104224130669612,
"median": 0.28712138100000006,
"user": 0.22509082,
"system": 0.5767922000000001,
"min": 0.2774496175,
"max": 0.2976787665
},
{
"command": "pacquet@main",
"mean": 0.4489127281,
"stddev": 0.07440978221882937,
"median": 0.43623736300000004,
"user": 0.6385317199999998,
"system": 0.7232891999999999,
"min": 0.3905589935,
"max": 0.6528244185000001
},
{
"command": "pacquet@HEAD",
"mean": 0.41638197759999995,
"stddev": 0.02145572261729397,
"median": 0.4109952365,
"user": 0.58875312,
"system": 0.6818899,
"min": 0.3877178215,
"max": 0.4607112225
}
]
}
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8091360472199998,
"stddev": 0.1443755352263998,
"median": 1.73724354392,
"user": 1.19875556,
"system": 1.25625996,
"min": 1.71468531642,
"max": 2.0872426694199997
},
{
"command": "pacquet@main",
"mean": 1.7304040532200002,
"stddev": 0.013333592290483575,
"median": 1.7318121179200001,
"user": 1.05749256,
"system": 1.11364786,
"min": 1.7017669314200001,
"max": 1.7487919544200001
},
{
"command": "pnpr@HEAD",
"mean": 0.38586356692,
"stddev": 0.051099229148508445,
"median": 0.35694514092,
"user": 0.36384655999999993,
"system": 0.8426859599999998,
"min": 0.33467818442,
"max": 0.46873830642000003
},
{
"command": "pnpr@main",
"mean": 0.34894227752000007,
"stddev": 0.00889281709737047,
"median": 0.34861323942,
"user": 0.30106826000000003,
"system": 0.7390738599999999,
"min": 0.33082657842,
"max": 0.36237992142000003
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20474524315333337,
"stddev": 0.015445144443099993,
"median": 0.20228515462000002,
"user": 0.20172368666666665,
"system": 0.07713065333333334,
"min": 0.18411576062,
"max": 0.23199234162000001
},
{
"command": "pacquet@main",
"mean": 0.20242575477384622,
"stddev": 0.011670958215594633,
"median": 0.20181702662000003,
"user": 0.19857848153846158,
"system": 0.07235575076923077,
"min": 0.18171262162000001,
"max": 0.22428741262000002
},
{
"command": "pnpr@HEAD",
"mean": 0.09078847396375,
"stddev": 0.002020912336076435,
"median": 0.09150167562,
"user": 0.03384873875,
"system": 0.013386238750000001,
"min": 0.08658047562,
"max": 0.09408869562000001
},
{
"command": "pnpr@main",
"mean": 0.09052868610387098,
"stddev": 0.0020617017259788235,
"median": 0.09031911862,
"user": 0.03318614903225806,
"system": 0.013943406451612904,
"min": 0.08669988062,
"max": 0.09402399262
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.577090940568889,
"stddev": 0.07573632711440652,
"median": 0.55745137168,
"user": 0.6082296977777778,
"system": 0.12611107111111108,
"min": 0.47265712668,
"max": 0.68731391368
},
{
"command": "pacquet@main",
"mean": 0.6072102703466666,
"stddev": 0.056649364922696684,
"median": 0.6070788436800001,
"user": 0.6503694755555557,
"system": 0.13013473777777776,
"min": 0.5336840366800001,
"max": 0.7133604396800001
},
{
"command": "pnpm@HEAD",
"mean": 2.9376657064577776,
"stddev": 0.0801970680839963,
"median": 2.96362144068,
"user": 4.478979586666666,
"system": 0.23526973777777777,
"min": 2.75271842968,
"max": 3.02116917468
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2009614954745455,
"stddev": 0.0311307820685244,
"median": 0.18504384302000002,
"user": 0.15999944363636362,
"system": 0.07429261090909091,
"min": 0.18096118802000002,
"max": 0.26087007602
},
{
"command": "pacquet@main",
"mean": 0.19831554625076922,
"stddev": 0.010731071093359577,
"median": 0.19891825102000002,
"user": 0.15367361846153843,
"system": 0.08305567384615385,
"min": 0.18420236602000004,
"max": 0.22173502802000003
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.45647059262,
"stddev": 0.10846497240704847,
"median": 4.43532892442,
"user": 1.5273419000000001,
"system": 1.54594888,
"min": 4.33677940442,
"max": 4.63146832942
},
{
"command": "pacquet@main",
"mean": 4.514855846719999,
"stddev": 0.14888629495549835,
"median": 4.47248950792,
"user": 1.4760418000000002,
"system": 1.4436592799999999,
"min": 4.322506467419999,
"max": 4.72753335742
},
{
"command": "pnpr@HEAD",
"mean": 3.49661241242,
"stddev": 0.12524868359013744,
"median": 3.44270054142,
"user": 1.4599411999999998,
"system": 1.4588935800000002,
"min": 3.37812946942,
"max": 3.7740341814200002
},
{
"command": "pnpr@main",
"mean": 3.4970204797200006,
"stddev": 0.08437110235276493,
"median": 3.46562580342,
"user": 1.4203606,
"system": 1.3959001799999997,
"min": 3.41076908842,
"max": 3.67970187742
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.11942956059090909,
"stddev": 0.004155836928523283,
"median": 0.1185401625,
"user": 0.1450193890909091,
"system": 0.13714483636363634,
"min": 0.1141175495,
"max": 0.1324003015
},
{
"command": "pacquet@main",
"mean": 0.11784676209090911,
"stddev": 0.004714645777597706,
"median": 0.116409397,
"user": 0.1411828890909091,
"system": 0.13594024545454547,
"min": 0.11333699450000001,
"max": 0.1314857745
},
{
"command": "pnpr@HEAD",
"mean": 0.1303510943421053,
"stddev": 0.0018496751133244749,
"median": 0.13008395450000002,
"user": 0.15472992736842106,
"system": 0.1400919631578947,
"min": 0.1277270765,
"max": 0.1335243635
},
{
"command": "pnpr@main",
"mean": 0.12884097665,
"stddev": 0.004062569192562044,
"median": 0.1280623575,
"user": 0.15645103,
"system": 0.13044840000000002,
"min": 0.12297801350000001,
"max": 0.1420770505
}
]
} |
Fetching a git dependency locked to an SSH remote now says to load a key with ssh-add when git reports a publickey refusal, and still explains how to re-record a pre-v11.21 entry with pnpm update. Resolving an SSH URL that fails the same way shows that advice plus a local HTTPS insteadOf rewrite. The rewrite uses the user git and a shell-safe host, so a password or a hostile host cannot reach the command. Closes pnpm#13743
The OpenSSH refusal text uses that spelling, and the release note quotes it.
Rustdoc read the bracketed port notation as an intra-doc link.
The pull request opened before workflow runs were recorded, and marking it ready then draft does not match the pull_request types these workflows listen for.
The rewrite prefix always named the user `git`, so for a remote that logs in as another user (AWS CodeCommit key IDs, or an ssh:// URL with no user) the suggested git config line matched nothing. The hint now keeps the ssh-add advice and omits the rewrite for those remotes, since the user name is never copied into a hint. Also use raw strings for the shell-injection test fixtures that dylint flagged, and make the changeset say ssh-add -l lists keys. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
7998ec8 to
a75d01e
Compare
Code Review by Qodo
1. Refusal checker docs omit edge cases
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
The hint fired on any detail containing "publickey", and git echoes the host in its stderr, so a connection failure to a host such as publickey.example.com got SSH key advice. Both CLIs now require the word inside OpenSSH's "Permission denied (...)" method list. The Rust ssh:// branch now parses with url::Url, matching the TypeScript CLI's URL, instead of splitting the authority by hand. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Replies to the Qodo review of a75d01e:
Written by an agent (Claude Code, claude-opus-5-5). |
|
Code review by qodo was updated up to the latest commit 7ca9834 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
The parser keeps the brackets around an IPv6 literal, and the hint's insteadOf prefix has to match that form.
|
Review-and-fix pass complete. The PR stays ready for review, as it was. Changes pushed on top of the rebase onto main:
Status on c19583d (the author's IPv6 test commit on top of my push): all 62 checks pass. CodeRabbit reviewed this commit and has no actionable comments. There are no open review threads. Qodo's latest review covers 7ca9834, which has all of the code changes. Its two bug-class findings are marked resolved. I declined the remaining style and JSDoc items, with reasons in the comment above. Qodo has not re-reviewed the test-only head commit. Nothing else remains within scope. Written by an agent (Claude Code, claude-opus-5-5). |
Summary
Closes #13743
Installing a git dependency that is still locked to an SSH remote, or resolving an SSH URL, failed with git's raw
Permission denied (publickey)and exit 128. The resolve path that used to record SSH for shorthandgithub:dependencies is already fixed. This change only adds the missing hint at the clone andls-remoteboundary.When the failure is a publickey refusal, pnpm now says to load a key with
ssh-add -l. Resolving an SSH URL also shows a localgit configHTTPS rewrite (url."https://host/".insteadOf) that leaves the recorded URL alone. A connection refusal stays without that auth hint.pnpm update <pkg>is still how to re-record a pre-v11.21 lockfile entry.pnpm install --forceand--resolution-onlydo not re-resolve git dependencies, so the hint does not recommend them as a repair.The rewrite is built from the user
gitand a shell-safe host. A password in the URL is dropped, and a host that could break out of the pasted command produces no hint. A remote that logs in as a user other thangitgets thessh-addadvice without the rewrite, because the rewrite prefix would have to repeat that user to match and userinfo is never echoed.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Cursor, Grok 4.7).
Fixes and description update by an agent (Claude Code, claude-opus-5-5).
Summary by CodeRabbit
ssh-add -l.