For a private repository, you will need to obtain a Personal Access Token from https://github.com/settings/tokens.
Then use the following curl command to get the details (substituting in values for [token], [owner] and [name]):
curl -u git:[token] https://api.github.com/repos/[owner]/[name] 2> /dev/null | grep size
As mentioned earlier, size may be in MB or KB.