Fatal: Not a git repository: --absolute-git-dir

Hi,I download the last version if PX4 fireware,
there is fatal err when I builded ,How can I do to fix this problem?

FAILED: cd /home/kwong/Downloads/PX4-Autopilot/build/px4_fmu-v2_default/NuttX/nuttx && make --quiet --no-print-directory CONFIG_ARCH_BOARD_CUSTOM=y pass1dep > nuttx_context.log
fatal: Not a git repository: --absolute-git-dir

Hi @elviskuang! Welcome to the community,…
Normally this means you were not in a directory that is a git repo when you tried to run a git command.
Did you download the zip or clone the repo?