Reputation: 140
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
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