mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-19 20:37:41 +00:00
Merge pull request #3954 from libgit2/cmn/osx-ssh-key
Travis Mac SSH key issues
This commit is contained in:
commit
e8ab13b3fd
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
if [ -n "$COVERITY" ];
|
if [ -n "$COVERITY" ];
|
||||||
then
|
then
|
||||||
./script/coverity.sh;
|
./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
|
cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
|
||||||
ssh-keyscan -t rsa localhost >>~/.ssh/known_hosts
|
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
|
# Get the fingerprint for localhost and remove the colons so we can parse it as
|
||||||
export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -F localhost -l | tail -n 1 | cut -d ' ' -f 2 | tr -d ':')
|
# 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_URL="ssh://localhost/$HOME/_temp/test.git"
|
||||||
export GITTEST_REMOTE_USER=$USER
|
export GITTEST_REMOTE_USER=$USER
|
||||||
|
Loading…
Reference in New Issue
Block a user