Hello, everyone. Today, we are going to introduce how to integrate GitHub into IntelliJ IDEA using Personal Access Token. The main difference between Token binding and Account binding is that Token binding allows you to limit the validity period of the token. When the token expires, the GitHub authorization obtained through this token will be terminated. This can be helpful for individuals with specific permission control requirements.
The version of IntelliJ IDEA I am using for this operation is 2023.2 (Community Edition).
Token Binding Procedure
1.Click on “Projects” and then click on “Get from VCS.”

2.After selecting “GitHub,” click on “Use token…” on the right side.

3.At this point, you will see a field where you can enter the Token. If you already have a Token, you can directly fill it in. (Please note that the token you enter here must have the “repo,” “gist,” “read:org,” and “workflow” permissions, or else it won’t work). If you don’t have a Token, you can click on the “Generate…” button to enter the process of creating a Token.

4.After clicking on “Generate…,” a web page will open. If you haven’t logged in to GitHub recently, it will prompt you to enter your password to log in again.

5.After a successful login, you will directly arrive at the page for creating a new Personal Access Token. Here, the most important fields are “Note” and “Expiration.” In the “Note” field, you should enter the purpose of this token so that you can quickly identify its original intent in the future. As for the “Expiration,” you can choose a specific number of days, customize a specific date, or set it to have no expiration.
Explanation of Expiration Options:
| 選項 | 說明 |
|---|---|
| …days | Choose a specific number of days for expiration. |
| Custom (Date) | Set a custom expiration date for the token. |
| No Expiration | Select this option for the token to never expire. |

6.Once the settings are complete, you can click on the “Generate token” button at the bottom of the page.

7.After the token is successfully generated, you will see that your token has been created. At this point, you can simply click on the “Copy” button to copy the token.

8.Go back to IntelliJ IDEA, paste the token you copied earlier into the token field, and click on the “Log In” button below.

9.After successful login, you will see your GitHub account on the left side, and on the right side, the repositories available for cloning are displayed. At this point, you can confirm that the integration is successful.

The above is the process for binding using the Personal Access Token. However, if one day, for administrative purposes, we need to revoke the permissions of this token, how can we do it? Please continue reading for the following steps.
Unbinding Personal Access Token Procedure
1.Open the web browser and log in to GitHub.。
2.Click on your profile picture in the upper right corner, and from the dropdown menu, select “Settings.”

3.Select “Developer settings” from the left-side menu.

4.In the new page, click on “Personal access tokens” and select “Tokens (classic).” On the right-hand side, locate the token you want to delete based on the “Note” you provided during its creation, then click on “Delete.”

5.At this point, a pop-up window will appear, asking for a final confirmation to delete the token, and emphasizing that this action is irreversible. Here, click on “I understand, delete this token.”

6.Here, you will immediately notice that the selected token has disappeared. At this point, you can confirm that the token has been invalidated.

By completing the above steps, we have successfully invalidated the token. However, in IntelliJ IDEA, the record of this GitHub account still exists, but it will be in a state of authentication failure. At this point, we can manually remove this GitHub account record. The relevant procedure has been explained in the article “IntelliJ IDEA Tutorial Series | GIT Operation EP1 | How to Integrate GitHub – Using Account Binding.” If you are interested, you can refer to that article for more details. We won’t repeat it in this post.




