[pytorch][require export] Don't require the repo to be cloned
Summary: Turns out, we don't install `git` on Meta's internal deployment images. Instead of using git, we can just use the API if the repo is `None`.
Differential Revision: D35598595
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75709
Approved by: https://github.com/seemethere, https://github.com/osalpekar