How to use https for authentication from EGit to GitHub
I am trying to setup EGit to work with GitHub wi开发者_开发问答th https authentication, instead of the default ssh. (My reason is that I am a teacher, and some of my students do their work from different machines, so it's not convenient to rely on ssh keys stored on disk.) Has anyone gotten this to work? When I try doing a "Push to Upstream" using https, I get the unhelpful error message "An internal Exception occured during push: https://espertus@github.com/MillsCollegeMobileAppDev2011/test.git: not authorized".
I am using Eclipse 3.6.2 (Helios) with versions 0.11.3 of Eclipse EGit (Incubation), Eclipse EGit - Source (Incubation), and EGit Mylyn (Incubation). My Destination Git Repository settings are:
- Location
- URI: https://espertus@github.com/MillsCollegeMobileAppDev2011/test.git
- Host: github.com
- Repository path: /MillsCollegeMobileAppDev2011/test.git
- Connection
- Protocol: https
- Port: [unset]
- Authentication
- User: espertus
- Password: ........
- Store in Secure Store: [checked]
you need input your github account password in:
Authentication
User: espertus
Password: HERE
Store in Secure Store: [checked]
enjoy it! :)
If your password is correct then another problem that can cause this is github's two-factor authentication. Disable it and the push should work.
Like Larry Parks mentioned, you will have issues with eGit access over HTTPS to GitHub when you are using two-factor authentication. The workaround is to create a "Personal Access Token" and use that instead of your password.
https://help.github.com/articles/creating-an-access-token-for-command-line-use/
精彩评论