ERROR: "Error occurred fetching gitfs remote 'git@####/###.git': error loading known_hosts:" seen in salt master logs when establishing GitFS connection
search cancel

ERROR: "Error occurred fetching gitfs remote 'git@####/###.git': error loading known_hosts:" seen in salt master logs when establishing GitFS connection

book

Article ID: 414004

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

  • This error trace is seen in the salt-master logs:
    • salt-master[####]: [ERROR   ] Error occurred fetching gitfs remote '[email protected]/example-repo.git': error loading known_hosts:
      salt-master[####]: Traceback (most recent call last):
      salt-master[####]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 2136, in _fetch
      salt-master[####]:     fetch_results = origin.fetch(**fetch_kwargs)
      salt-master[####]:   File "/opt/saltstack/salt/extras-3.10/pygit2/remotes.py", line 245, in fetch
      salt-master[####]:     payload.check_error(err)
      salt-master[####]:   File "/opt/saltstack/salt/extras-3.10/pygit2/callbacks.py", line 111, in check_error
      salt-master[####]:     check_error(error_code)
      salt-master[####]:   File "/opt/saltstack/salt/extras-3.10/pygit2/errors.py", line 67, in check_error
      salt-master[####]:     raise GitError(message)
      salt-master[####]: _pygit2.GitError: error loading known_hosts:

  • Assets such as pillars, grains and states to be fetched through the git filesystem backend are not shown in the Aria Config GUI

Environment

  • VMware Aria Automation Config (Saltstack Enterprise / Tanzu Guardrails for Workloads)
  • External git server for files hosted with GitFS

Resolution

The issue is resolved with Salt version 3006.17

Workaround:

Downgrade pygit2 to version 1.11.1

Issues with either PyGit2 or GitPython are sometimes seen to be solved by switching from one to the other of these git libraries.

Additional Information