Pygithub: Can I Create Tokens with PyGithub? I can't find any examples and would love some guidance

Created on 25 Sep 2019  路  4Comments  路  Source: PyGithub/PyGithub

Hi There 馃憢 !
I'm new to pygithub and the github api so please let me know if this isn't the right place to ask this question. i've been pouring through the docs and do some some reference to the authorization object but i'm not exactly sure how to use it. Has anyone implemented authorization as follows:

user authenticates with github username and password
Token is created in their account via pygithub
Token string is accessed via pygithub

Most of the examples start with the user providing the login credentials or the token string. but i'd like to create the string via the api and then access it.

Thank you for any guidance!

stale

Most helpful comment

Could this issue be reopened?

All 4 comments

Working with @lwasser - we're trying to switch from github3 to pygithub, and looking for replacement instructions for gh3's authenticating with 2FA and using tokens. I can see how to use pygithub login with username + password, or how to login with a token, but would like to authenticate with username + password + 2fa_code and then use that authentication to get a token (which I can then save to a local config).

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

we need a sad face github emoji for this!

Could this issue be reopened?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PeterJCLaw picture PeterJCLaw  路  6Comments

nixoz2k7 picture nixoz2k7  路  7Comments

nchammas picture nchammas  路  3Comments

jacquev6 picture jacquev6  路  3Comments

BBI-YggyKing picture BBI-YggyKing  路  5Comments