Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Implement and manage GitHub authentication, including GitHub Apps, GITHUB\_TOKEN, and personal access tokens

A worked example

Single answer

An engineer needs an unattended script on a workstation to call the GitHub API. The firewall permits HTTPS connections to GitHub but blocks SSH connections.

No GitHub Actions workflow participates in issuing credentials for the script. No GitHub App is installed for the target repository, and policy prohibits registering an application for this script.

Which authentication credential should the engineer use?

Choose one answer
Why

A PAT can authenticate the script's GitHub API requests using the permitted network path. SSH is blocked, and the scenario supplies neither a participating Actions workflow nor an installed GitHub App that could provide the other credentials.

  • Correct: A personal access token. The source identifies PATs as credentials for scripts and GitHub API calls, including use in networks where SSH authentication is restricted.
  • Not correct: An SSH authentication key. The source describes SSH keys as authenticating repository access through SSH. That connection method is blocked in this scenario.
  • Not correct: A workflow GITHUB_TOKEN. The source describes GITHUB_TOKEN as a credential issued by GitHub Actions during workflow execution. The scenario provides no participating workflow to issue it.
  • Not correct: A GitHub App installation token. The source describes GitHub App authentication through application provisioning, installation, and generated access tokens. The scenario does not provide an installed app and prohibits registering one for this purpose.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free