github two factor and eclipse

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.

the new two factor authentication for apple

I upgraded the OS on my iPad and MacBook Pro today. I also set up the “new” two factor system. I hadn’t set it up with the old system when I set up two factor on many other accounts.

Setup was easy as described here. I added both my home and cell numbers. I like that you can choose whether to receive a text or phone call with the code. A code was sent to or called on each phone to verify. Since I set this up from my Mac, it became a trusted device. My iPad is recognized as logged in, but not trusted so the code only appears on my Mac.

I then signed in to my apple account in Safari to try to set it up as trusted. On my Mac, the six digit verification code automatically popped up. Minor bug, it was a window that went to the background when I tabbed away and I couldn’t find it when command+tab to switched. I had to drag my browser window out of the way to get it back. When I went to look at iCloud > username > devices on my iPad, I again got the location/verification code pop up on my computer. More convenient this time since it was a different device. I like that it shows the location of the device that wants the code.

I also got an email saying I turned on two factor and that I can opt out by clicking the link for a limited time. I like that the link expires to reduce the attack surface. Of course, I can always opt out through actually logging into my account.

The only problem is that I can’t figure out how to make my iOS 9.1 iPad a trusted device. The option just isn’t there under iCloud > username > password and security.