### Summary

Attempting to install collections from bitbucket onto a shared ansible host for my team.  when running the install command I get a No such file or directory: 'git' error.

I have to use git+ssh for multiple reasons, primary being ssh access to our bitbucket is hosted on a non-standard port.

This is working on a Ubuntu 20.04 focal WSL environment with the following configuration:

ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/bmorris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/bmorris/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0]
  jinja version = 2.10.1
  libyaml = True

However, I cannot get this to work on a Debian 11 Bullseye server with the same core version but newer python version.

### Issue Type

Bug Report

### Component Name

ansible-galaxy

### Ansible Version

```console
$ ansible --version
ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/bmorris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/bmorris/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
  jinja version = 2.11.3
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed
No changes reported
```


### OS / Environment

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

### Steps to Reproduce

```
ansible-galaxy -vvv collection install git+ssh://git@bitbucket.com:7999/my_namespace/my_collections.git -p /my/collections/path/
```


### Expected Results

ansible-galaxy installs the collections from the git repo over ssh to the specified destination.  

### Actual Results

```console
$ ansible-galaxy -vvv collection install git+ssh://git@bitbucket.com:7999/my_namespace/my_collections.git -p -p /my/collections/path/
[DEPRECATION WARNING]: Setting verbosity before the arg sub command is deprecated, set the verbosity after the sub command. This feature will be removed from ansible-core in version 2.13. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
ansible-galaxy [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/bmorris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/bmorris/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-galaxy
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
  jinja version = 2.11.3
  libyaml = True
Using /etc/ansible/ansible.cfg as config file
ERROR! Unexpected Exception, this is probably a bug: [Errno 2] No such file or directory: 'git'
the full traceback was:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ansible/galaxy/collection/concrete_artifact_manager.py", line 241, in get_direct_collection_meta
    return self._artifact_meta_cache[collection.src]
KeyError: 'git+ssh://git@bitbucket.com:7999/my_namespace/my_collections.git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/ansible-galaxy", line 128, in <module>
    exit_code = cli.run()
  File "/usr/lib/python3/dist-packages/ansible/cli/galaxy.py", line 569, in run
    return context.CLIARGS['func']()
  File "/usr/lib/python3/dist-packages/ansible/cli/galaxy.py", line 86, in method_wrapper
    return wrapped_method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/ansible/cli/galaxy.py", line 1149, in execute_install
    requirements = self._require_one_of_collections_requirements(
  File "/usr/lib/python3/dist-packages/ansible/cli/galaxy.py", line 828, in _require_one_of_collections_requirements
    'collections': [
  File "/usr/lib/python3/dist-packages/ansible/cli/galaxy.py", line 829, in <listcomp>
    Requirement.from_string(coll_input, artifacts_manager)
  File "/usr/lib/python3/dist-packages/ansible/galaxy/dependency_resolution/dataclasses.py", line 195, in from_string
    return cls.from_requirement_dict(req, artifacts_manager)
  File "/usr/lib/python3/dist-packages/ansible/galaxy/dependency_resolution/dataclasses.py", line 321, in from_requirement_dict
    req_version = art_mgr.get_direct_collection_version(tmp_inst_req)
  File "/usr/lib/python3/dist-packages/ansible/galaxy/collection/concrete_artifact_manager.py", line 230, in get_direct_collection_version
    return self.get_direct_collection_meta(collection)['version']  # type: ignore[return-value]
  File "/usr/lib/python3/dist-packages/ansible/galaxy/collection/concrete_artifact_manager.py", line 243, in get_direct_collection_meta
    b_artifact_path = self.get_artifact_path(collection)
  File "/usr/lib/python3/dist-packages/ansible/galaxy/collection/concrete_artifact_manager.py", line 186, in get_artifact_path
    b_artifact_path = _extract_collection_from_git(
  File "/usr/lib/python3/dist-packages/ansible/galaxy/collection/concrete_artifact_manager.py", line 359, in _extract_collection_from_git
    subprocess.check_call(git_clone_cmd)
  File "/usr/lib/python3.9/subprocess.py", line 368, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.9/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git'
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import copy
import json
import os
import pytest
import re
import shutil
import stat
import tarfile
import yaml
from io import BytesIO, StringIO
from mock import MagicMock, patch
import ansible.module_utils.six.moves.urllib.error as urllib_error
from ansible import context
from ansible.cli.galaxy import GalaxyCLI
from ansible.errors import AnsibleError
from ansible.galaxy import collection, api, dependency_resolution
from ansible.galaxy.dependency_resolution.dataclasses import Candidate, Requirement
from ansible.module_utils._text import to_bytes, to_native, to_text
from ansible.utils import context_objects as co
from ansible.utils.display import Display
class RequirementCandidates():
    def __init__(self):