{"meta":{"title":"Updating credentials from the macOS Keychain","intro":"You'll need to update your saved credentials in the git-credential-osxkeychain helper if you change your username, password, or personal access token on GitHub.","product":"Get started","breadcrumbs":[{"href":"/en/enterprise-cloud@latest/get-started","title":"Get started"},{"href":"/en/enterprise-cloud@latest/get-started/git-basics","title":"Git basics"},{"href":"/en/enterprise-cloud@latest/get-started/git-basics/updating-credentials-from-the-macos-keychain","title":"macOS Keychain credentials"}],"documentType":"article"},"body":"# Updating credentials from the macOS Keychain\n\nYou'll need to update your saved credentials in the git-credential-osxkeychain helper if you change your username, password, or personal access token on GitHub.\n\n> \\[!NOTE]\n> Updating credentials from the macOS Keychain only applies to users who manually configured a personal access token using the `osxkeychain` helper that is built-in to macOS.\n>\n> We recommend you either [configure SSH](/en/enterprise-cloud@latest/authentication/connecting-to-github-with-ssh) or upgrade to the [Git Credential Manager](/en/enterprise-cloud@latest/get-started/git-basics/caching-your-github-credentials-in-git) (GCM) instead. GCM can manage authentication on your behalf (no more manual personal access tokens) including 2FA (two-factor auth).\n\nWhen Git prompts you for your password, enter your personal access token. Alternatively, you can use a credential helper like [Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager/blob/main/README.md). Password-based authentication for Git has been removed in favor of more secure authentication methods. For more information, see [Managing your personal access tokens](/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).\n\n> \\[!NOTE]\n> This article contains commands or examples that use the `github.com` domain. You might access GitHub at a different domain, such as `octocorp.ghe.com`.\n\n## Updating your credentials via Keychain Access\n\n1. Click on the Spotlight icon (magnifying glass) on the right side of the menu bar.\n2. Type `Keychain Access`, then press the Enter key to launch the app.\n3. In Keychain Access, search for `github.com`.\n4. Find the \"Internet password\" entry for `github.com`.\n5. Edit or delete the entry accordingly.\n\n## Deleting your credentials via the command line\n\nThrough the command line, you can use the credential helper directly to erase the keychain entry.\n\n```shell\n$ git credential-osxkeychain erase\nhost=github.com\nprotocol=https\n> [Press Return]\n```\n\nIf it's successful, nothing will print out. To test that it works, try and clone a private repository. If you are prompted for a password, the keychain entry was deleted.\n\n## Further reading\n\n* [Caching your GitHub credentials in Git](/en/enterprise-cloud@latest/get-started/git-basics/caching-your-github-credentials-in-git)"}