Last active
March 27, 2018 18:22
-
-
Save hoetz/b6e0f6f24fbfa251cd5c to your computer and use it in GitHub Desktop.
Github auth token with powershell
This file contains hidden or 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
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("USERNAME:PASSWORD"))) | |
Invoke-RestMethod -Uri "https://api.github.com/authorizations" -method post -ContentType "application/json" -Body "{""scopes"" : ""gist"",""note"":""VSCode-Gist-Extension""}" -Headers @{"Authorization"="Basic $base64AuthInfo"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment