Merge remote-tracking branch '1stvamp/github-tokens-from-git-config'
commit
bf5f34a114
|
@ -350,6 +350,13 @@ class GitHubDriver extends VcsDriver
|
||||||
|
|
||||||
protected function authorizeOAuth()
|
protected function authorizeOAuth()
|
||||||
{
|
{
|
||||||
|
// If available use token from git config
|
||||||
|
if (0 === $this->process->execute('git config github.accesstoken', $output)) {
|
||||||
|
$this->io->write('Using Github OAuth token stored in git config (github.accesstoken)');
|
||||||
|
$this->io->setAuthorization($this->originUrl, $output[0], 'x-oauth-basic');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$attemptCounter = 0;
|
$attemptCounter = 0;
|
||||||
|
|
||||||
$this->io->write('The credentials will be swapped for an OAuth token stored in '.$this->config->get('home').'/config.json, your password will not be stored');
|
$this->io->write('The credentials will be swapped for an OAuth token stored in '.$this->config->get('home').'/config.json, your password will not be stored');
|
||||||
|
|
Loading…
Reference in New Issue