FJ-38: restore TLS/SSH in libgit2 so AGit push works over HTTPS #46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "david/fix/agit-libgit2-tls-FJ-38"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes FJ-38:
fj pr create -aAfailed againsthttps://remotes withthere is no TLS stream available; class=Ssl (16).Root cause
git2 0.21.0 changed its
defaultfeature set from["ssh", "https"](0.20) to[]. The 0.20 -> 0.21 bump therefore silently built the vendored libgit2 with no TLS and no SSH transport. Every API-backed command kept working (fj's HTTP client links OpenSSL separately, which is whylddlooked healthy), but the AGit fetch/push path goes through libgit2 and died at the first https connection. Confirmed viacargo tree -i libgit2-sys -e features(onlydefault, nohttps/ssh) and by the new test failing against the pre-fix graph.Changes
crates/fj/Cargo.toml: enablehttpsandsshfeatures on git2 explicitly, restoring 0.20 default parity, with a comment naming the trap. Cargo.lock picks uplibssh2-sysandopenssl-probe.crates/fj/tests/libgit2_features.rs: integration test assertinggit2::Version::get().https()and.ssh(), so a feature regression fails CI (cargo testin check.yml and the pre-commit hook) instead of failing the first user push. Verified red on the old graph, green on the new one.crates/fj/src/prs.rs:class=Sslfetch/push failures against an https remote now wrap the libgit2 error with an actionable hint ("rebuild fj with the git2httpsfeature enabled, or use an ssh:// remote").Verification
This PR was itself opened with the fixed binary via
fj pr create --agitover the https remote, which is acceptance criterion 1 exercised end to end. Note for other environments: libgit2 does not read~/.netrc, so the AGit path needs a git credential helper (or ssh remote); that auth gap is separate from the TLS fix and worth its own issue.#FJ-38