The reason of this error by the time you have made a major upgrade on your Mac is due to the fact that you have not yet agreed to the license agreement for Xcode Command Line Tools.
Now it’s important to mention that git itself does not specify whether the error is coming from your local machine or the remote host
Here the lucrative steps that you should take to Resolve this error.
The Priominent Cause of this error is "invalid active developer path" and you have fix it first.
The Command Line Tools Package is a small self-contained package available for download separately from Xcode.
Afterwords, you just need to run the Command Line Tool installation command as demonstrated in the previous section, and you should then be good to go.