diff --git a/gitlab_get_user_public_key.sh b/gitlab_get_user_public_key.sh index a92a60dd..1724e2fa 100755 --- a/gitlab_get_user_public_key.sh +++ b/gitlab_get_user_public_key.sh @@ -49,5 +49,5 @@ fi echo "# Fetching SSH Public Key(s) from GitLab for account: $user" >&2 echo "#" >&2 -curl -sS "https://gitlab.com/api/v4/users/$user/keys" | +curl -sS --fail "https://gitlab.com/api/v4/users/$user/keys" | jq -r '.[].key'