summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlosmn@github.com>2016-10-05 23:46:02 +0200
committerGitHub <noreply@github.com>2016-10-05 23:46:02 +0200
commite8ab13b3fd8485086c2a906dac85ecc8fa162d84 (patch)
tree4b5de9634f9cedb7dbc1414e3fbceff9a6d86073
parent9fbbb0eec5fc46cc9c36abf25b9baf653eb12372 (diff)
parentdb357667bc8a9b9379f5e9171838d87a510e77a8 (diff)
downloadlibgit2-e8ab13b3fd8485086c2a906dac85ecc8fa162d84.tar.gz
Merge pull request #3954 from libgit2/cmn/osx-ssh-key
Travis Mac SSH key issues
-rwxr-xr-xscript/cibuild.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/script/cibuild.sh b/script/cibuild.sh
index 979eb0ce4..b13ad88c4 100755
--- a/script/cibuild.sh
+++ b/script/cibuild.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+set -x
+
if [ -n "$COVERITY" ];
then
./script/coverity.sh;
@@ -49,8 +51,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