Linking a Github Account
Overview
In this section, you will learn how to link your Github account to PyCharm. This will allow you to clone Github repositories, push and pull changes, and work on a codebase collaboratively with others.
New to GitHub?
Clone: Push Pull
Generating a token
-
- Open the settings menu
- Refer to Opening the Settings Menu for detailed steps to open the settings menu.
- Type
version controlinto the search bar -
- Click [Version Control]>[GitHub] on the left side menu
-
- Click [+] in the top left corner of the menu

After clicking [+], a selection box will popup.
-
- Click [Log In with Token]

This will cause the popup window [Add GitHub Account] to appear.
-
- Click "Generate"

This will open a Github on your preferred browser.
-
- Confirm access to Github by entering your password
- It is assumed you are already logged into your Github account.
-
- Set your token expiry date (default 30 days)

How long should you set the expiry for?
Basically, the shorter the token life, the more secure it will be. If someone gains access to your token, this will affect the integrity of your GitHub account. We recommend setting your token for a custom amount of approximately 4 months (ie. until the end of the semester). If choosing a shorter expiry, make sure that the expiration date does not line up with your midterm or final, as generating a new token during your exam will lead to unneccesary stress.
-
- Click [Generate Token] at the bottom of the page
- The default scopes that are selected for your token should be adequate. If desired, you can select all of the scopes (there is no [Select All] button unfortunately).
-
- Copy the generated token

- Switch back to PyCharm and paste your token
- Click [Add Account]
Next Steps
If you followed all the previous steps in order, you will have successfully linked your GitHub to Pycharm, and are ready to move on to INSERT SECTION NAME HERE. If you were unable to locate any of the options, please follow this troubleshooting guide.