cargo-semver-checks
cargo-semver-checks copied to clipboard
Support custom git configurations that rewrite HTTPS to SSH
Steps to reproduce the bug with the above code
With a custom Git config that rewrites https to ssh cargo semver-checks check-release
fails .
~/.config/git/config
:
[url "[email protected]:"]
insteadOf = "https://github.com/"
Actual Behaviour
Error: unsupported URL protocol; class=Net (12)
Caused by:
unsupported URL protocol; class=Net (12)
Expected Behaviour
It works...
Generated System Information
Software version
cargo-semver-checks 0.15.2
cargo version
> cargo -V
cargo 1.64.0 (387270bc7 2022-09-16)
Build Configuration
No response
Additional Context
No response
Possibly related: https://github.com/obi1kenobi/cargo-semver-checks/issues/272
I think this is sadly blocked on upstream issues: https://github.com/frewsxcv/rust-crates-index/issues/37 which is itself caused by https://github.com/rust-lang/git2-rs/issues/600
Sadly, not much we can do about them short of implementing SSH support ourselves instead of using the upstream crates, which doesn't seem like a good idea.
As soon as the upstream crates add SSH support, a cargo update
on our end will fix it for cargo-semver-checks too. Alternatively, since this problem is fixed in cargo, merging our tool into cargo should fix the problem too. Linking #61 for that.