Skip to content

Commit

Permalink
Merge pull request #73 from wechuli/wechuli/use-bearer-auth
Browse files Browse the repository at this point in the history
Fix basic auth to the supported Bearer authentication
  • Loading branch information
jcfr authored Nov 14, 2023
2 parents e2a11e9 + 0a6e708 commit ee853ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion github_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def _request(*args, **kwargs):
if not token:
token = os.environ.get("GITHUB_TOKEN", None)
if token and with_auth:
kwargs["auth"] = (token, 'x-oauth-basic')
# Using Bearer token authentication instead of Basic Authentication
kwargs['headers'] = kwargs.get('headers', {})
kwargs['headers']['Authorization'] = 'Bearer ' + token
for _ in range(3):
response = request(*args, **kwargs)
is_travis = os.getenv("TRAVIS", None) is not None
Expand Down

0 comments on commit ee853ab

Please sign in to comment.