Unexpected behaviour of "git" plugin

I’m noticing a strange issue with the git plugin while attempting to checkout a special tag of that project.

Doing the same for about 20 subprojects of the same project works fine.

Also doing equivalent orders at console works fine:

This is the problem:

Works:

git clone https://github.com/Kurento/kms-cmake-utils
cd kms-cmake-utils
git checkout tags/6.16.0

Does not work, hangs in the checkout step and fails after a couple of minutes with an obscure timeout error:

  • name: KMS-CMAKE-UTILS - Clone (run as non-privileged user)
    tags: kms-cmake-utils
    git:
    repo: ‘https://github.com/Kurento/kms-cmake-utils
    dest: ~/{{ kms_build_dir }}/kms-cmake-utils
    version: “tags/{{ kurento_media_server_version}}”
    force: yes
    become: yes
    become_user: “{{ non_root_user }}”

kms_build_dir is “kms-build”
kurento_media_server_version is “6.16.0”
non_root_user is “ubuntu”

The error is

ASK [KMS-CMAKE-UTILS - Clone (run as non-privileged user)] *********************************************************************************************************************************
fatal: [kms7]: FAILED! => {“changed”: false, “msg”: “Failed to init/update submodules: Submodule ‘3rdparty/sanitizers-cmake’ (git://github.com/arsenm/sanitizers-cmake.git) registered for path ‘3rdparty/sanitizers-cmake’\nCloning into ‘/home/ubuntu/kms-build/kms-cmake-utils/3rdparty/sanitizers-cmake’…\nfatal: unable to connect to github.com:\ngithub.com[0: 140.82.121.4]: errno=Connection timed out\n\nfatal: clone of ‘git://github.com/arsenm/sanitizers-cmake.git’ into submodule path ‘/home/ubuntu/kms-build/kms-cmake-utils/3rdparty/sanitizers-cmake’ failed\nFailed to clone ‘3rdparty/sanitizers-cmake’. Retry scheduled\nCloning into ‘/home/ubuntu/kms-build/kms-cmake-utils/3rdparty/sanitizers-cmake’…\nfatal: unable to connect to github.com:\ngithub.com[0: 140.82.121.3]: errno=Connection timed out\n\nfatal: clone of ‘git://github.com/arsenm/sanitizers-cmake.git’ into submodule path ‘/home/ubuntu/kms-build/kms-cmake-utils/3rdparty/sanitizers-cmake’ failed\nFailed to clone ‘3rdparty/sanitizers-cmake’ a second time, aborting\n”}

-vvv doesn’t give much help

Anybody having an idea, what is going wrong here?

That submodule is configured to use SSH to retrieve the git repository. Ensure your host can SSH to github.com or change submodule to use HTTPS instead.

The host uses SSH to github and exposes that to the node

I was working around by issuing the “checkout” as shell command.