Skip to content

Instantly share code, notes, and snippets.

@Interfiber
Created September 27, 2020 18:27
Show Gist options
  • Save Interfiber/1d2ea237f12b9927085da86b92e26553 to your computer and use it in GitHub Desktop.
Save Interfiber/1d2ea237f12b9927085da86b92e26553 to your computer and use it in GitHub Desktop.
Create a Github Gist with the github api
# Generate a Github Token Under Settings/Developer Settings/Personal Access Tokens Create A New one with
# The gist premisson and copy and paste the string it gitves you in the place of "YOUR_AUTH_TOKEN_HERE"
#
curl -X POST -H "Authorization: token YOUR_AUTH_TOKEN_HERE" https://api.github.com/gists -d '{"public":true,"files":{"file1":{"content":"File One Content"}, "file2":{"content":"File2 content"}}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment