summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2016-10-05 20:17:06 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2016-11-03 10:31:53 +0100
commitf061aa85d5feb32d7e07c3fd554391976cfb3c09 (patch)
treeeff33909897930635fdf4778b012c6920cb3020a
parent821042b673675546a265827ea184c6fa14e0623d (diff)
downloadlibgit2-f061aa85d5feb32d7e07c3fd554391976cfb3c09.tar.gz
travis: take the newer ssh-keygen format into account
The Mac machines have updated their SSH version and so the ssh-keygen format has changed. Ask it for MD5, which is the one that is output as hex.
-rwxr-xr-xscript/cibuild.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/script/cibuild.sh b/script/cibuild.sh
index 5707f01cb..6709b38f9 100755
--- a/script/cibuild.sh
+++ b/script/cibuild.sh
@@ -44,8 +44,13 @@ ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" -q
cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
ssh-keyscan -t rsa localhost >>~/.ssh/known_hosts
-# Get the fingerprint for localhost and remove the colons so we can parse it as a hex number
-export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -F localhost -l | tail -n 1 | cut -d ' ' -f 2 | tr -d ':')
+# Get the fingerprint for localhost and remove the colons so we can parse it as
+# a hex number. The Mac version is newer so it has a different output format.
+if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -E md5 -F localhost -l | tail -n 1 | cut -d ' ' -f 3 | cut -d : -f2- | tr -d :)
+else
+ export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -F localhost -l | tail -n 1 | cut -d ' ' -f 2 | tr -d ':')
+fi
export GITTEST_REMOTE_URL="ssh://localhost/$HOME/_temp/test.git"
export GITTEST_REMOTE_USER=$USER