From: https://www.shellhacks.com/git-verbose-mode-debug-fatal-errors/
Debug Git command:
GIT_TRACE=true \
GIT_CURL_VERBOSE=true \
GIT_SSH_COMMAND="ssh -vvv" \
git clone git://host.xz/path/to/repo.git
Debug Git-related issues with the maximum level of verbosity:
GIT_TRACE=true \
GIT_CURL_VERBOSE=true \
GIT_SSH_COMMAND="ssh -vvv" \
GIT_TRACE_PACK_ACCESS=true \
GIT_TRACE_PACKET=true \
GIT_TRACE_PACKFILE=true \
GIT_TRACE_PERFORMANCE=true \
GIT_TRACE_SETUP=true \
GIT_TRACE_SHALLOW=true \
git clone git://host.xz/path/to/repo.git
Example to limit traces to a SSH public-key potential issue:
GIT_SSH_COMMAND="ssh -vvv" \
git clone git://host.xz/path/to/repo.git