chore: debug SSH connection problem
This commit is contained in:
parent
04e7b0a5bd
commit
c32aa4db8b
|
|
@ -26,8 +26,12 @@ jobs:
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
echo ">>> chmod public key"
|
echo ">>> chmod public key"
|
||||||
chmod 600 ~/.ssh/id_ed25519.pub
|
chmod 600 ~/.ssh/id_ed25519.pub
|
||||||
|
echo ">>> dns resolve"
|
||||||
|
nslookup focs.gc.sjtu.edu.cn || host focs.gc.sjtu.edu.cn || echo "DNS failed"
|
||||||
|
echo ">>> tcp test"
|
||||||
|
timeout 5 bash -c "echo >/dev/tcp/focs.gc.sjtu.edu.cn/2222" 2>&1 || echo "TCP failed"
|
||||||
echo ">>> ssh-keyscan"
|
echo ">>> ssh-keyscan"
|
||||||
ssh-keyscan -p 2222 focs.gc.sjtu.edu.cn >> ~/.ssh/known_hosts
|
timeout 10 ssh-keyscan -p 2222 focs.gc.sjtu.edu.cn >> ~/.ssh/known_hosts || echo "ssh-keyscan failed"
|
||||||
echo ">>> ssh test"
|
echo ">>> ssh test"
|
||||||
ssh -T git@focs.gc.sjtu.edu.cn -p 2222
|
ssh -T git@focs.gc.sjtu.edu.cn -p 2222
|
||||||
# - name: Lint
|
# - name: Lint
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,12 @@ jobs:
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
echo ">>> chmod public key"
|
echo ">>> chmod public key"
|
||||||
chmod 600 ~/.ssh/id_ed25519.pub
|
chmod 600 ~/.ssh/id_ed25519.pub
|
||||||
|
echo ">>> dns resolve"
|
||||||
|
nslookup focs.gc.sjtu.edu.cn || host focs.gc.sjtu.edu.cn || echo "DNS failed"
|
||||||
|
echo ">>> tcp test"
|
||||||
|
timeout 5 bash -c "echo >/dev/tcp/focs.gc.sjtu.edu.cn/2222" 2>&1 || echo "TCP failed"
|
||||||
echo ">>> ssh-keyscan"
|
echo ">>> ssh-keyscan"
|
||||||
ssh-keyscan -p 2222 focs.gc.sjtu.edu.cn >> ~/.ssh/known_hosts
|
timeout 10 ssh-keyscan -p 2222 focs.gc.sjtu.edu.cn >> ~/.ssh/known_hosts || echo "ssh-keyscan failed"
|
||||||
echo ">>> ssh test"
|
echo ">>> ssh test"
|
||||||
ssh -T git@focs.gc.sjtu.edu.cn -p 2222
|
ssh -T git@focs.gc.sjtu.edu.cn -p 2222
|
||||||
- name: Set up Git
|
- name: Set up Git
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user