Last active
February 7, 2022 08:27
-
-
Save typebrook/48ec1f0b59f7ec0b459c9bb4d6b47bd8 to your computer and use it in GitHub Desktop.
[curl-Github] Use curl to get Github Access Token #github #curl #token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://api.github.com/authorizations \ | |
--user "typebrook" \ | |
--data '{"scopes":["gist"], "note": "gist"}' | |
read -p "2-factor code: " OTP | |
curl https://api.github.com/authorizations \ | |
--user typebrook -H "X-GitHub-OTP: $OTP" \ | |
--data '{"scopes": ["gist"], "note": "gist"}' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment