Skip to content
SayScreen

GitHub tutorial

How to create a personal access token in GitHub

SayScreen

This whole video was made by AI.

Make your own at sayscreen.com

Start for $1

$1 for 7 days, then $49/month

  • 4:30 video
  • 12 steps
  • Last verified December 1, 2026

A personal access token lets scripts, tools and the command line reach GitHub in place of your password, with only the access you give it. GitHub has two kinds: classic tokens, with broad scopes, and fine-grained tokens, which GitHub recommends because each one is limited to the repositories and permissions you choose. This video makes a fine-grained token called Demo Token that expires in 7 days and can only read the files of one repository (Contents read-only, plus the Metadata permission GitHub requires), on top of the read-only access to public repositories every token has. GitHub showed its Confirm access page first, which offered Verify via email. The token is shown only once, so copy it and keep it somewhere safe.

Steps

  1. 1Click your profile picture, then SettingsThe profile picture is in the top-right corner of any GitHub page.0:14
  2. 2Click Developer settingsIt is at the bottom of the left sidebar.0:24
  3. 3Open Personal access tokens and click Fine-grained tokensTokens (classic) are the older kind, with broad scopes, and are made under Tokens (classic) instead. GitHub recommends fine-grained tokens, which are limited to the repositories and permissions you choose.0:32
  4. 4Click Generate new tokenGitHub may ask you to confirm it's you first. Here its Confirm access page offered Verify via email.0:48
  5. 5Enter a token name and description, then check Resource ownerThe description is optional. Resource owner, your account here, sets whose resources the token can change. A token can always read public repositories.1:04
  6. 6Choose when the token expiresThe menu offers 7, 30, 60 or 90 days, Custom or No expiration, and starts on 30 days. This video picks 7 days: the shorter its life, the less harm a leaked token can do.1:28
  7. 7Under Repository access, choose Only select repositoriesPublic repositories gives read-only access to public repositories, and All repositories covers every repository you own, now and in the future.1:45
  8. 8Click Select repositories and check each repositoryFilter by name, check each one (demo-project here) and close the list. You can pick up to 50.2:09
  9. 9Under Permissions, click Add permissions and select ContentsThe Repositories tab holds permissions for the repositories you picked, and the Account tab for your account. Search the list, select Contents and press Escape. Metadata comes with it, read-only and required.2:24
  10. 10Choose Read-only or Read and writeRead and write would let a tool push changes. This token keeps Contents read-only.3:07
  11. 11Click Generate token and check the summaryIt shows when the token expires and what it can do: here 2 read-only permissions for 1 repository.3:23
  12. 12Click Generate token again and copy your new tokenGitHub shows the token only this once, so copy it and keep it somewhere safe, such as a password manager. When Git asks for your password over HTTPS, paste the token instead. It stays in the list with its expiry date, and Delete removes it.3:35

Transcript

0:00A personal access token is like a password made just for scripts, tools and the command line. Instead of your real password, apps use it to reach GitHub on your behalf, with only the access you give them.

0:14Let's create one. Start by opening your profile menu in the top right corner. Then choose Settings, where everything about your account lives.

0:24Tokens are tucked away in Developer settings, near the bottom of this sidebar. Open Developer settings.

0:32Expand Personal access tokens to see the two kinds GitHub offers. Classic tokens are the older style with broad scopes. GitHub recommends fine-grained tokens, which limit access to specific repositories and permissions.

0:48You don't have any tokens yet, so click Generate new token. Because tokens grant access to your account, GitHub may ask you to confirm it's really you first. Complete the check and you'll land on the new token form.

1:04First, give the token a name you'll recognize later, like Demo Token. The description is optional, but a quick note about what the token is for helps when you review it months from now. Resource owner decides whose resources the token can change: your personal account, or an organization you belong to. It can always read public repositories.

1:28Next is Expiration, which sets when the token stops working on its own. Shorter is safer, since a leaked token can't be used for long. You can pick a custom date or no expiration, but for a demo, seven days is plenty.

1:45Repository access controls which repositories the token can reach. Public repositories gives read-only access to public code. All repositories covers everything you own, now and in the future. The safest choice is usually Only select repositories, so the token touches just the projects it needs.

2:09Open the repository picker to choose them. Filter by name to find the one you want, here demo-project. Then check it to add it to the token. Close the picker, and the repository appears in the list.

2:24Permissions decide what the token is allowed to do. Grant only what your tool actually needs. They come in two groups. Repository permissions cover code, issues and pull requests in the repos you picked, while Account permissions cover your personal account, like your profile or SSH keys. To grant one, click Add permissions. There's a long list, so search for Contents, which covers the files in a repository. Select it to add it to the token. Press Escape to close the list. Contents now shows up, along with Metadata, which GitHub always requires as read-only.

3:07Each permission has an access level. Open this menu to choose between read-only and read and write. Read and write would let a tool push changes. Our demo only needs to read files, so keep it read-only.

3:23With everything set, click Generate token. GitHub shows a summary to double-check: the expiration date, and two read-only permissions for one repository.

3:35Looks right, so confirm with Generate token. Your new token is ready. This is the only time GitHub will show it, so copy it now. Once you leave this page, you can't see it again. Click the copy button and store the token somewhere safe, like a password manager. Treat it like a password and never share it or commit it to code. The token now appears in your list, with its expiration date. If it ever leaks, or you no longer need it, you can delete it from here. And that's it: you've created a fine-grained personal access token with a short expiration, access to one repository, and only the permissions it needs.

GitHub is a trademark of its owner. SayScreen isn't affiliated with, sponsored or endorsed by GitHub; this video shows the public app as it looked when it was recorded, and we last checked the steps on December 1, 2026. If GitHub has changed since, tell us at hey@sayscreen.com. GitHub's own guide: docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens.

All GitHub videos