#!/usr/bin/env bash #url="git@gitea.maboiteverte.fr:shell/bash_mbv.git" url="https://clicclac.synology.me:3000/shell/bash.git" url="bruno@dsm916e:/volume1/Repositories/bash.git" url="https://Bruno21@github.com/Bruno21/kymsu.git" ## Returns errlvl 0 if $1 is a reachable git remote url git-remote-url-reachable() { git ls-remote "$1" CHECK_GIT_REMOTE_URL_REACHABILITY >/dev/null 2>&1 } if git-remote-url-reachable "$url"; then ## code echo "reachable !" fi