This should work around the problem for you:
FIX: Allow dashboard to load even when git version cannot be found · discourse/discourse@ca9ef58 · GitHub
You could override it in a plugin. But note that the only installation method we support is this one. Since you are using an unsupported installation method, we can’t guarantee everything will work correctly.