github two factor and eclipse

Main menu:

Topics

Recent Posts

Feeds

RSS Feed RSS - Posts

July 2017
M T W T F S S
« Jun   Aug »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Past Posts

Java/Java EE

JDBC

Other

github two factor and eclipse

July 15th, 2017 by Jeanne Boyarsky

I was talking to a coworker recently about using Eclipse with Git. I had done this back in 2010, but it has been a while. I use git at the command line. He also said Eclipse Oxygen support for Git is better than in the past. Could be. To be honest, I don’t remember doing this in 2010 other than the command line being far easier.

Anyway, I decided to try again. The UI was intuitive. I went to commit. The git staging view (confirmation dialog) showed up at the bottom where the console is rather than popping up like SVN does, but that’s minor. It gave me a choice of “commit and push” which is nice as it isn’t a two step operation.

Then I hit a problem. I turned on GitHub two factor authentication back in 2014. Which means my user id/password isn’t accepted through Eclipse. Luckily this is easy to get past:

  1. Go to github and choose settings (from the upper right pulldown under your avatar)
  2. Click the very last link which is Personal Access Tokens
  3. Choose “Create new token”
  4. Enter a description. I choose “Mac Eclipse”
  5. Choose which permissions you want to grant. I chose the Repo checkbox.

Then I tried to commit and push using my git username and the generated token string as the password. Success. (I didn’t pull because nobody else use this repo)

Note: I got an error “git-receive-pack not permitted” when I didn’t choose the Repo checkbox. In Eclipse, it showed my change as committed (which it was), but it wasn’t pushed.

Write a comment