GitHub
Enable the Git plugin
This functionality relies on the Git plugin, which is bundled and enabled in DataGrip by default. If the relevant features are not available, make sure that you did not disable the plugin.
Press Ctrl+Alt+S to open settings and then select
.Open the Installed tab, find the Git plugin, and select the checkbox next to the plugin name.
Install the GitHub plugin
This functionality relies on the GitHub plugin, which you need to install and enable.
Press Ctrl+Alt+S to open settings and then select
.Open the Marketplace tab, find the GitHub plugin, and click Install (restart the IDE if prompted).
DataGrip lets you manage Git projects hosted on GitHub directly from the IDE: clone repositories, share your projects, create forks, share code through gists, create pull requests and review incoming pull requests.
Register a GitHub account
To be able to retrieve data from a repository hosted on GitHub, or share your projects, you need to register your GitHub account in DataGrip.
Register an existing account by signing in to GitHub
Press Ctrl+Alt+S to open settings and then select
.Click .
Select Log In via GitHub.
Enter your GitHub credentials in the browser window that opens. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application.
Register an existing account with a token
Press Ctrl+Alt+S to open settings and then select
.Click .
Select Log In with Token.
Do one of the following:
If you already have a token, insert it in the Add GitHub Account dialog window:
If you want to obtain a new token, click Generate.
Enter your GitHub credentials in the browser window that opens. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application.
In the token generation page, make sure that the repo, the gist and the read:org scopes are enabled (refer to Understanding scopes).
Click Generate token, copy the token, and paste it into the Add GitHub Account dialog window.
Click Add Account
See Creating a personal access token for more details on GitHub tokens.
Update an expired token
When your token expires, you see the following warning when trying to push changes to the GitHub repository:
Click Use Token.
Do one of the following:
If you already have a token, insert it in the Log In to GitHub dialog window:
If you want to obtain a new token, click Generate.
Enter your GitHub credentials in the browser window that opens. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application.
In the token generation page, make sure that the repo, the gist and the read:org scopes are enabled (refer to Understanding scopes).
Click Generate token, copy the token, and paste it into the Log In to GitHub dialog window.
Click Log In
Create a new GitHub account
Press Ctrl+Alt+S to open settings and then select
.Click .
Select Log In via GitHub.
In the browser window that opens, click Create an account and complete the registration process on GitHub.
Return to the DataGrip settings, click Cancel, and then repeat steps 2 and 3.
Click Authorize JetBrains in browser.
Manage multiple GitHub accounts
You can use multiple GitHub accounts in DataGrip: for example, a personal account to work on an open-source project, and a corporate account for your main job.
Press Ctrl+Alt+S to open settings and then select
.Use the button to add as many accounts as you need.
(Optional) To set an account as a default one for the current project, select it and click . If a default account is set, DataGrip will not ask you to select an account you want to use when you share your project on GitHub, rebase a fork, create a pull request, or create a gist.