<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Joomla\Github\Github;
use Joomla\Github\Http;
use Joomla\Http\Transport;
use Joomla\Registry\Registry;
$options = new Registry;
$options->set('api.username', $username);
$options->set('api.password', $password);
$curl = new Transport\Curl();
$stream = new Transport\Stream();
$socket = new Transport\Socket();
$httpCurl = new Http(array(), $curl);
$httpStream = new Http(array(), $stream);
$httpSocket = new Http(array(), $socket);
$githubCurl = new Github($options, $httpCurl);
$githubStream = new Github($options, $httpStream);
$githubSocket = new Github($options, $httpSocket);
var_dump(count($githubCurl->orgs->getList()));
var_dump(count($githubStream->orgs->getList()));
var_dump(count($githubSocket->orgs->getList()));
and I get:
int(5)
int(5)
Fatal error: Uncaught exception 'DomainException' with message 'Not Found'
i.e. the credentials get passed in fine with Curl and with Stream, but there is an issue with Socket. Can you check to see if socket is being used?