Look up git metadata via GitHub env vars when available (#1974)
* Look up git metadata via GitHub env vars when available
and fall back to `git` operations otherwise. This also changes the way
that a `git` repo is detected to use `git` itself instead of checking
for `.git` directory existence.
(linked to internal issue PLAT-228)
* Skip tests that use `git` when `git` is not available
* Log output of `git` errors from tests
* Log combined stdout and stderr of `git`
* Configure git user bits
* Use correct octal literal format
* Overwrite GitHub env vars in tests
so that they work in a GitHub Actions context