Rahul Tank
Rahul Tank

Reputation: 140

How to recover Personal Access Token In Github?

Is there any option to recover Personal Access Token in Github?

Because my app is using the PAT in composer and I don't want to replace it.

Upvotes: 1

Views: 10766

Answers (1)

VonC
VonC

Reputation: 1324248

You would need to replace it (OAuth Authorizations), since a token cannot be accessed after the generation step.

In a bash shell:

curl https://api.github.com/authorizations \
  -X POST \
  --user "YourGitHubUsername" \
  --data '{"scopes":["gist","repo],"note":"new token"}'

(replace "new token" by something more meaningful)

Upvotes: 2

Related Questions