IntelliJ cannot log in to GitHub

That kind of error messages can be frustrating, as it takes more than a little knowledge on the subject to understand exactly what is wrong. Usually, however, the problem is either the authentication (invalid username/email/password) or that there's a problem with git (locally).

First of all, check that you have git installed by running "git" from the command prompt. This is a more common mistake than one would think.

Second, try y.bedrov's suggestion. Log in to github.com on the web. Settings -> Developer settings -> Personal access tokens. Create a new token and then, in IntelliJ, select Enter Token at the login prompt.

Tokens are considered a more secure way to authenticate, I believe.


When you make first attempt to access GitHub from IntelliJ, you do not have intellij-github authorization in place and also tokens.

So, follow the instructions here to get rid to this issue. https://www.jetbrains.com/help/idea/github.html#register-account

After this, the project can be easliy shared on github.


Oh, in case you generated the token from GitHub and are unable to use that in IntelliJ...

Then, go to Settings -> Version Control -> GitHub

In the Login to GitHub popup, click "Use Token" on the top right corner of the popup.

Add your token and enjoy.

enter image description here