summaryrefslogtreecommitdiff
path: root/misc/tests/git-server-ssh-protocol.sh
blob: b1a063fbb5df62cd78a29eecb1968693f3db9b2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /usr/bin/env bash

tmp=`mktemp -d`

cd $tmp

# SSH protocol
git clone git@git.ilvokhin.com:infra.git > /dev/null 2>&1

if [ $? -eq 0 ]; then
    echo "ssh: OK"
    rm -rf infra
else
    echo "ssh: FAIL"
fi

# SSH protocol absolute path
git clone ssh://git@git.ilvokhin.com:/srv/git/infra.git > /dev/null 2>&1

if [ $? -eq 0 ]; then
    echo "ssh absolute: OK"
    rm -rf infra
else
    echo "ssh absolute: FAIL"
fi

cd - > /dev/null
rm -rf $tmp