You can use git ls-remote for this. Because I get a 'Unauthorized access for repository apiapp.git' I use as example torvalds linux-repo.
$ git ls-remote --heads git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
6d15ee492809d38bd62237b6d0f6a81d4dd12d15 refs/heads/master