If you want to work with GitHub repositories from your notebook, like cloning, editing, or pushing files, you’ll need a GitHub Personal Access Token (PAT). This token lets you authenticate your API calls and gives you the right permissions. The GIF below shows the steps to create a token.
To see the full steps, follow the instructions below that match the type of access you want.
- Go to https://github.com/ and sign in.
- Click your profile icon (top right) ➔ Settings
- In the left sidebar, select Developer settings ➔ Personal access tokens ➔ Tokens (classic)
- On the top right side (at the same level as
Personal access tokens (classic)), click on Generate new token ➔ Generate new token (classic) - Give your token a descriptive Name (e.g.,
Notebook RW Token) and set an Expiration if desired - Under Scopes, check:
- repo
- contents
Grants read & write access to repository contents (needed for cloning, editing, and pushing files)
- contents
- (Optional: To only work with public repositories, select public_repo instead of repo)
- repo
- Click Generate token at the bottom
- Copy your new token right away. You won’t be able to see it again later!
- Paste the token into your notebook’s
GitHub-tokenfield, so API calls authenticate as the chosen owner.
- Go to https://github.com/ and sign in.
- Click your profile icon (top right) ➔ Settings
- In the left sidebar, select Developer settings ➔ Personal access tokens ➔ Tokens (classic)
- Click Generate new token (classic)
- For Resource owner, select the owner of the repository (your user or organisation)
- Give your token a descriptive Name (e.g.,
Notebook Read-Only Token) and set an Expiration if desired - Under Scopes, check:
- repo
- contents
Grants read-only access to repository contents (needed for cloning or viewing files only)
- contents
- (Optional: For public repositories, select public_repo instead of repo)
- repo
- Click Generate token at the bottom
- Copy your new token immediately—you won’t see it again!
- Paste the token into your notebook’s
GitHub-tokenfield for authentication.
← Previous 🏠 Home Next →
