Cannot clone Git repository on RHEL 8

Solution Verified - Updated -


  • Cannot clone a Git repository on Ansible Tower running on RHEL 8

    File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/", line 1355, in run self.pre_run_hook(self.instance, private_data_dir) 
    File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/", line 1959, in pre_run_hook job.project.scm_type, job_revision
    File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/", line 2345, in make_local_copy depth=1, single_branch=True, # shallow, do not copy full history 
    File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/git/repo/", line 1017, in clone_from return cls._clone(git, url, to_path, GitCmdObjectDB, progress, multi_options, **kwargs)
    File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/git/repo/", line 958, in _clone finalize_process(proc, stderr=stderr)
    File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/git/", line 328, in finalize_process proc.wait(**kwargs)
    File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/git/", line 408, in wait raise GitCommandError(self.args, status, errstr) git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git clone --branch=master --depth=1 --single-branch -v file:///var/lib/awx/projects/_72__test_rhat /tmp/awx_7095_v75i7jid/project stderr: 'Cloning into '/tmp/awx_7095_v75i7jid/project'... fatal: cannot copy '/usr/share/git-core/templates/hooks/fsmonitor-watchman.sample' to '/tmp/awx_7095_v75i7jid/project/.git/hooks/fsmonitor-watchman.sample': Operation not permitted '
  • Cannot clone a Git repository using the command line on RHEL 8

    $ mkdir FOO && cd FOO
    $ git init
    fatal: cannot copy '/usr/share/git-core/templates/hooks/fsmonitor-watchman.sample' to '/home/rmetrich/FOO/.git/hooks/fsmonitor-watchman.sample': Operation not permitted
    $ echo $?


  • Red Hat Enterprise Linux 8 (RHEL 8)
    • fapolicyd-1.0-3.el8_3.2.x86_64
    • git
  • Ansible Tower 3.7+
    • fapolicyd-1.0-3.el8_3.2.x86_64
    • git

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In