<KEY_ID>
with the key ID for your new key.
<KEY_ID>
with the key ID for your new key.
PyGithub
library, which allows you to interact with the GitHub API using Python. You can install it using pip by running pip install PyGithub
.
admin:public_key
scope.
Github
class from the PyGithub
library to authenticate with your GitHub account using the personal access token.
get_gpg_keys()
method of the authenticated Github
object.expiration_date
attribute of the Github.GPGKey
object. If the key has already expired or will expire soon, delete it using the delete()
method.create_gpg_key()
method of the authenticated Github
object. You can specify the key type, key length, and expiration date using the key_type
, key_length
, and expiration_date
parameters.commit()
and push()
methods of the Github.Git.Commit
object.