1
0
mirror of synced 2025-12-23 21:07:12 -05:00
Files
docs/content/github/authenticating-to-github/creating-a-personal-access-token.md
jmarlena ed5a109e48 [MERGES AFTER GHAE CB ships] Remove "public repository" wording for GHAE (#18008)
* Empty commit

* updated beta note for GHAE

* more GHAE update + resolve conflict

* more GHAE updates + prepare for screenshots

* Apply suggestions from code review

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>

* address remaining review comments

* Revise "About GitHub AE" (#17679)

* add screenshots to the Configuring article

* reworked to have a separate GHAE section

* list numbering

* more work on screenshots and conditions

* add GHAE screenshots in article

* review screenshots in article

* added more screenshots and updated more articles

* screenshot madness

* fix liquid versioning

* refactor the ghae script

* [GHAE CB/Feb 22]: Add article about data residency for GitHub AE (#17847)

* add missing GHAE versioning to article

* move screenshots to GHAE asset directory

* forgot to change the path for these two images

* replace CBB screenshot + add better screenshot

* [GHAE CB/Feb 22]: Document upgrades for GitHub AE (#17848)

* Version article for GitHub AE

* Replace unused variable

* Incorporate reviewer feedback

* Update intro

Co-authored-by: Ethan P <56270045+ethanpalm@users.noreply.github.com>

* [GHAE] Enable IP allow list (#17691)

* Notes for CC

* Updat permission leves chart

* Add updated article to further reading

* Update gated feature callout with GitHub AE

* Version "Managing allowed IP addresses for your organization" for AE

* Update images

* Update "Restricting network traffic to your enterprise" with new procedures

* remove todo note

* Update audited actions

* Update info about Premium Runners

* Use reusable for Premium Runners

* Change "Premium Runners" to "AE hosted runners"

* Incorporate reviewer feedback

* Use correct reusable

* Version reusable correctly

* [Feb 22] GHAE: Code scanning beta (#17830)

* Add "github-ae" to all the frontmatter

* GHAE-ify the reusables

* Add some more changes

* Re-use some content

* 🔪 Semmle links

* Revert change re "--external-repository-token" in the CodeQL runner

* Update CodeQL runner token scopes

* Update two screenshots

* Remove mention of GitHub.com from AE + other fixes

* Apply suggestions from code review

Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>

* Use `product_name` variable instead of `product_location`

* Remove confusing phrase

* [Feb 22] GHAE: Code scanning API and webhook docs (#17883)

* Version API and webhook docs

* Actually add versioning for GHAE

* Fix anchor

* [TEMPORARY] Preview for API endpoints

* Revert API previews

* Update procedure step

Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>

* Update docs for AzureAD Group SCIM support in GHAE (#17892)

* Version out reference to public Pages site for GHAE

* [GHAE CB] SMTP bootstrapping flow (#17888)

* draft

* update with AE conntent

* update with tons of versioning

* remove that  lie

* fill out the rest of these steps

* update with correct versioning

* more edits

* add images

* reversion most of ae article

* fix versioning

* format correctlly

* words matter

* last image

* update with permmissions

* update versioning

* add link

* apply feedback ❤️

* update with differrent spacing

* update with feedback

* more feedback

* Temporary GHAE release notes for consumables beta launch (#17859)

* Create release-notes.md

* Add frontmatter

* Add to index file

* Update github-ae-release-notes.md

* Add release notes from Google Doc

* Update finalized docs links that have been reviewed

* OAuth device flow link update

* version for AE

* few fixes

* Update content/admin/overview/github-ae-release-notes.md

* small edits

* whoops

* commit

* update with different links

* used wrong reusable

* fix more brokenness

* Update repository-references.js

* Update repository-references.js

Co-authored-by: Meg Bird <megbird@github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>

* [GHAE] Audit public repos (#17917)

* verifying what we mean by public

* Apply suggestions from code review

* Update content/developers/apps/installing-github-apps.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* fixing placememnt of liquid conditional

Co-authored-by: Laura Coursen <lecoursen@github.com>

* GHAE packages beta (#17786)

Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>
Co-authored-by: Martin Lopes <martin389@github.com>

* Batch #1 of changes

* Batch #2

* getting started article update

* Update GraphQL article

* Only public repository reference

* Just update the link

* Update endpoint title to use "internal"

* fix build error

* placeholder update for updating `public_repo` scope in UI

* Remove unncessary versioning for now

* fix broken links

* Add REST API files

* Remove versioning since the endpoint "title" didn't get updated

* Version out the no scope option

* Evergreen rewrite

Co-Authored-By: Aaron Harpole <507570+aharpole@users.noreply.github.com>

* Add back public key

* Apply suggestions from code review

Co-authored-by: Alex Slepak <ams11@github.com>
Co-authored-by: Aaron Harpole <aharpole@github.com>

* Remove versioning and add evergreen rewrite

* Just the way it was before

* fix confusing legacy bit

* Apply suggestions from code review

Co-authored-by: Alex Slepak <ams11@github.com>

* Apply suggestions from code review

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* Movin' on up

* no versioning needed

* internal gists exist!

* Doesn't need versioning

* Keep this as-is

* Remove screenshots 💥

* Apply suggestions from code review

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* Never updated REST API docs with different endpoint name

* No versioning needed

* Merge conflict fix: Updated this article from main branch

* Apply suggestions from code review

* Revert "Add REST API files"

This reverts commit 1a8ad0adca47daaa1bf9d1b3642c4ec073564996.

* checkout changes from main

* Update OpenAPI Descriptions (#18103)

Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
Co-authored-by: mchammer01 <42146119+mchammer01@users.noreply.github.com>
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
Co-authored-by: shati-patel <shati-patel@github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
Co-authored-by: skedwards88 <skedwards88@github.com>
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Meg Bird <megbird@github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Leona B. Campbell <3880403+runleonarun@users.noreply.github.com>
Co-authored-by: Martin Lopes <martin389@github.com>
Co-authored-by: Aaron Harpole <507570+aharpole@users.noreply.github.com>
Co-authored-by: Alex Slepak <ams11@github.com>
Co-authored-by: Aaron Harpole <aharpole@github.com>
Co-authored-by: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com>
2021-03-04 21:31:30 -08:00

4.2 KiB

title, intro, redirect_from, versions
title intro redirect_from versions
Creating a personal access token You should create a personal access token to use in place of a password with the command line or with the API.
/articles/creating-an-oauth-token-for-command-line-use/
/articles/creating-an-access-token-for-command-line-use/
/articles/creating-a-personal-access-token-for-the-command-line
/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
free-pro-team enterprise-server github-ae
* * *

Personal access tokens (PATs) are an alternative to using passwords for authentication to {% data variables.product.product_name %} when using the GitHub API or the command line.

{% if currentVersion == "free-pro-team@latest" %}If you want to use a PAT to access resources owned by an organization that uses SAML SSO, you must authorize the PAT. For more information, see "About authentication with SAML single sign-on" and "Authorizing a personal access token for use with SAML single sign-on."{% endif %}

{% if currentVersion == "free-pro-team@latest" %}{% data reusables.user_settings.removes-personal-access-tokens %}{% endif %}

Creating a token

{% if currentVersion == "free-pro-team@latest" %}1. Verify your email address, if it hasn't been verified yet.{% endif %} {% data reusables.user_settings.access_settings %} {% data reusables.user_settings.developer_settings %} {% data reusables.user_settings.personal_access_tokens %} 4. Click Generate new token. Generate new token button 5. Give your token a descriptive name. Token description field 6. Select the scopes, or permissions, you'd like to grant this token. To use your token to access repositories from the command line, select repo. {% if currentVersion == "free-pro-team@latest" or enterpriseServerVersions contains currentVersion %} Selecting token scopes {% elsif currentVersion == "github-ae@latest" %} Selecting token scopes {% endif %} 7. Click Generate token. Generate token button 8. Click {% octicon "clippy" aria-label="The copy to clipboard icon" %} to copy the token to your clipboard. For security reasons, after you navigate off the page, you will not be able to see the token again.{% if currentVersion == "free-pro-team@latest" %} Newly created token{% else %} Newly created token{% endif %}

{% warning %}

Warning: Treat your tokens like passwords and keep them secret. When working with the API, use tokens as environment variables instead of hardcoding them into your programs.

{% endwarning %} {% if currentVersion == "free-pro-team@latest" %}9. To use your token to authenticate to an organization that uses SAML SSO, authorize the token for use with a SAML single-sign-on organization.{% endif %}

Using a token on the command line

{% data reusables.command_line.providing-token-as-password %}

Personal access tokens can only be used for HTTPS Git operations. If your repository uses an SSH remote URL, you will need to switch the remote from SSH to HTTPS.

If you are not prompted for your username and password, your credentials may be cached on your computer. You can update your credentials in the Keychain to replace your old password with the token.

Further reading