You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use AppBearerTokenAuth in login_as_app_installation
Previously, this method used an Authorization header via `headers`
parameter, instead of an AuthBase instance via `auth` parameter.
But the requests library has this behavior where it will strip the
Authorization header on redirects, and then pick up fresh credentials
from other sources (~/.netrc in particular, if present).
Any AuthBase object, though, is still attached to the request, so this
makes for an incredibly difficult issue to debug: all of github3.py
uses AuthBase to authenticate, except login_as_app_installation. The
latter thus being the only place in which the issue can manifest, when
~/.netrc has an entry for api.github.com. By using AppBearerTokenAuth,
this can no longer happen.
0 commit comments