Russell Gordon

Creating a Personal Access Token for Xcode

04 January, 2021

    This brief tutorial will show you how to give Xcode permission to save your work in repositories on GitHub.

    Creating the token

    Follow this link to create a new personal access token.

    If necessary, sign in to GitHub using the account that you created earlier.

    In the Note field, type Xcode.

    In the Select scopes table, enable the checkbox beside repo.

    Now scroll down and press the green Generate token button.

    On the next page, click the little clipboard icon beside the token. This will copy the token to your computer's clipboard.

    Adding the token to Xcode

    Now switch to Xcode.

    Open the Xcode menu, and choose Preferences.

    Click on the Accounts tab.

    NOTE: Because I already use Xcode, I already have several accounts created. It's OK if you don't see any accounts created on your computer just yet.

    In the bottom left hand corner, press the + sign button.

    Scroll down a bit, then select GitHub and press Continue.

    In the sheet that appears, type your GitHub account name in the Account field.

    In the Token field, paste the token using Command-V on your keyboard.

    Then press the Sign In button.

    You're all set! Xcode can now write to any repository that you create on GitHub.