When you install GIT for the first time on your computer, and you’re trying to sync a repository, this message can come up. In my situation while I was using Visual Studio Code.
Luckily, this is simply fixed by adding these entries to your global git config on your computer. This can be archived by the following commands in a Windows CMD or PowerShell prompt. I did it in my Visual Studio build in terminal.
git config --global user.email "yourEmail"
git config --global user.name "yourName"