Open xiongchiamiov opened 2 years ago
I am facing the same issue You are describing. I think it is because of this: https://docs.github.com/en/rest/overview/other-authentication-methods#basic-authentication
It says that using usernames and passwords for auth is discontinued. Personal access tokens (and other methods described in the link) should work.
If this is true than it should certainly be documented in github3.py documentation. I found the GitHub page by accident.
I'm trying to update a very old project of mine that uses github3.py. I've been having difficulties getting even just the authorization to work, and it appears that the basic examples at the start of the documentation don't work. People appear to be using this successfully! so I'm not sure what's going on here. Here's a complete reproduction starting from an empty directory:
I thought maybe it had something to do with having 2fa enabled on my account, so I tried that:
And then even tried explicitly authorizing the object (which is weird because I'm having to pass the username and password again into an object that already has them), which gives a new error but still not any success:
(Inspecting into that, btw, gives the url as https://api.github.com/authorizations. That endpoint appears to have been removed in 2020, which I guess is what #986 is about.)