Warm tip: This article is reproduced from stackoverflow.com, please click
github command-line passwords token two-factor-authentication

Are GitHub personal access tokens single use (then they expire/delete)?

发布于 2020-03-27 10:18:05

Can GitHub personal access tokens be set to single use only?

I'm reading the GitHub Personal Access Token setup guide. It appears that I create a 'token' to eliminate the need for my 2FA code when using GitHub from the command line.

I want this token to either expire after I use it, or I want the ability to delete it permanently somehow after I use it. Is this possible? Otherwise it seems to defeat the purpose of 2FA because if somebody got my token they could get into my GitHub without 2FA.

Questioner
Jason Hunter
Viewed
78
Jason Hunter 2019-07-03 21:34

There are two options to Delete a single token or Revoke All tokens in Github.