

For more information, see the curl project download page.Ĭreate an access token. If you get a message similar to command not found: curl, you need to download and install curl. If the output is information about the version of curl, it is installed. To check if curl is installed, execute curl -version in the command line. Install curl if it isn't already installed on your machine. For more information about getting started with the REST API using GitHub CLI, see the GitHub CLI version of this article.


Note: The following example workflows are intended for. For more information about GITHUB_TOKEN, see " Automatic token authentication." For more information about secrets, see " Encrypted secrets." If this is not possible, store your token as a secret and replace GITHUB_TOKEN in the example below with the name of your secret. GitHub recommends that you use the built-in GITHUB_TOKEN instead of creating a token. Instead of using the gh auth login command, pass an access token as an environment variable called GH_TOKEN. For more information, see " Using GitHub CLI in workflows." You can also use GitHub CLI in your GitHub Actions workflows. For more information, see the GitHub CLI api documentation. Use the api subcommand to make your API request. For more information, see the GitHub CLI auth login documentation. Use the auth login subcommand to authenticate to GitHub CLI. For installation instructions, see the GitHub CLI repository. Install GitHub CLI if you haven't installed it yet. Alternatively, rerun the gh auth login command to authenticate to instead of your instance. If you'd prefer to try the example using GitHub Enterprise Server, you must replace octocat/Spoon-Knife with a repository on your instance. Note: The following example is intended for.
