Consider additional default ssh keys for LibGit2. #44767
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When LibGit2 needs an ssh key, it will by default only look for
~/.ssh/id_rsa
. Since GitHub dropped support for certain keys, new RSA keys will not work with Julia's default build of LibGit2/LibSSH2 to connect to GitHub (sufficiently old RSA keys should still be ok and other git services than GitHub may still work fine).For Julia 1.8 and later, ECDSA keys work with LibGit2/LibSSH2 and are accepted by GitHub, but Julia will not find that key without prompting unless you specify it with
SSH_KEY_PATH
.With this PR Julia will default to
~/.ssh/id_ecdsa
if no~/.ssh/id_rsa
is found. Arguably the list of keys should be longer but at this point RSA and ECDSA keys are the only ones Julia's LibSSH2 understands (up to 1.7, RSA only).Further discussion in JuliaLang/Pkg.jl#3030.