mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
tests: append the github.com ssh keys so we have access during tests
Currently just the one test needs it. The ssh-rsa makes sure we're asking for the cipher we find in `known_hosts` as that won't be the one selected by default. This will be relevant in later changes.
This commit is contained in:
@@ -170,6 +170,11 @@ if [ -z "$SKIP_SSH_TESTS" ]; then
|
||||
echo "[localhost]:2222 $algorithm $key" >>"${HOME}/.ssh/known_hosts"
|
||||
done <"${SSHD_DIR}/id_rsa.pub"
|
||||
|
||||
# Append the github.com keys for the tests that don't override checks.
|
||||
# We ask for ssh-rsa to test that the selection based off of known_hosts
|
||||
# is working.
|
||||
ssh-keyscan -t ssh-rsa github.com >>"${HOME}/.ssh/known_hosts"
|
||||
|
||||
# Get the fingerprint for localhost and remove the colons so we can
|
||||
# parse it as a hex number. Older versions have a different output
|
||||
# format.
|
||||
|
||||
Reference in New Issue
Block a user