Sagemaker Huggingface PermissionError: [Errno 13] Permission denied: 'git'

Using Sagemaker 2.191.0 huggingface, with the following code, trying to use git_config

git configuration to download our fine-tuning script

    git_config = {
        'repo': 'https://github.com/huggingface/transformers.git', 'branch': 'v4.30.0'}

    role = 'xxxxxxxxxxxxx'

    huggingface_estimator = HuggingFace(
        # fine-tuning script to use in training job
        entry_point="run_glue.py",
        # directory where fine-tuning script is stored
        source_dir="./examples/pytorch/text-classification",
        instance_type="ml.p3.2xlarge",          # instance type
        instance_count=1,                       # number of instances
        # IAM role used in training job to acccess AWS resources (S3)
        role=role,
        git_config=git_config,
        # Transformers version (only upto 4.17 supported)
        transformers_version="4.17",
        pytorch_version="1.10",                  # PyTorch version
        py_version="py38",                       # Python version
        output_path=output_path,
        hyperparameters=hyperparameters,         # hyperparameters to use in training job
        environment={"HUGGINGFACE_HUB_CACHE": "/tmp/.cache"}
    )
    
    training_dataset_s3_path = f"{training_data_uri}/train"
    validation_dataset_s3_path = f"{training_data_uri}/val"
    test_dataset_s3_path = f"{training_data_uri}/test"

  huggingface_estimator.fit(
            {"train": training_dataset_s3_path,
             "validation": validation_dataset_s3_path,
             "test": test_dataset_s3_path,
             }, logs=True, job_name=training_job_name
        )

I get the following error when running

self._execute_child(args, executable, preexec_fn, close_fds,

File “/usr/lib/python3.10/subprocess.py”, line 1847, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: ‘git’