IntelliJ IDEA GitHub integration creates the repository, but gets “couldn't authorize” error trying to push

  1. I create a new project in IntelliJ IDEA

  2. Via the menu, I go to VCS -> Import into Version Control -> Share project on GitHub

  3. Enter a new repository name and click Share

  4. It authenticates with GitHub ok

  5. When I try to push to GitHub, a login window opens that says "Login to https://github.com/myemail@gmail.com/GitHubTest2.git"

  6. The default login is github.com/my_username. I try to login with that login and my GitHub.com password and authentication fails. I also try to login with my GitHub.com login (i.e. myemail@gmail.com) and my GitHub.com password.

  7. After 3 tries, I get the following error message:

Push to GitHub failed Push authorization failure: Couldn't authorize

Why does it authenticate with GitHub with my GitHub.com login/password but not when it tries to push the project to GitHub?

Answers


The following worked for me:

  • Instead of using username and password use a personal access token. In GitHub: Go to "Account settings" > "Applications" and generate a "Personal Access Token"

In IntelliJ:

  • Go to "Settings" > "Version control" > "GitHub" and enter your login and the generated access token. Now pushing to the GitHub repo should work.

Need Your Help

Jquery scroller needs to move one content downward at a time

javascript jquery html css

I have a jquery scroller which moves one content upward at a time. But when we click on upward link it moves multiple content smoothly downwards.I want this move downward link also move one content...

Android activity to handle multi threading

android multithreading button asynchronous

In my activity class i want to perform a series of long calculations that require around 5 sec to complete when i press a button. So in order to do that i have create a new class which does all the

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.