The github.auth.basic username, password
doesn't seem to work, you need to set it manually:
String userPassBase64 = "$username:$password".toString().bytes.encodeBase64()
def github = new HTTPBuilder('https://api.github.com')
def emails = github.get(path: '/user/emails', headers: ["Authorization": "Basic $userPassBase64"])