I could be doing something else wrong, but when it tries to request /git/refs/heads%2Fgh-pages, it returns a 404 because I don't have a gh-pages branch yet, and then fails out.
error while publishing
{
"code": 404,
"message": "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/enterprise/2.7/v3\"}"
}