See the git client plugin documentation section on host key verification. You have several choices:
- If using supported operating systems for controller and agents (no Red Hat Enterprise Linux 7, no CentOS 7, no Oracle Linux 7, no Scientific Linux 7, no Amazon Linux 2, …), you can configure the “accept first” strategy to accept and remember the ssh host key on first connection
- Provide the ssh host keys for the git repository hosts in the “manually provided keys” strategy
- Place the ssh host keys in the
~/.ssh/known_hosts
on all agents and use the “known hosts” strategy - Disable ssh host key verification with the “no verification” strategy (not recommended)