Skip to content

Commit

Permalink
Fix authentication error due to user-agent header not being set properly
Browse files Browse the repository at this point in the history
  • Loading branch information
nbish11 committed Jul 7, 2018
1 parent 82a0aef commit 4725c89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct(string $repository, string $token = null)
$headers = [sprintf('User-Agent: %s', self::USER_AGENT)];

if ($token) {
$headers[] = [sprintf('Authorization: token %s', $token)];
$headers[] = sprintf('Authorization: token %s', $token);
}

$this->context = stream_context_create(['http' => ['header' => $headers]]);
Expand Down

0 comments on commit 4725c89

Please sign in to comment.