Home » Eclipse Projects » EGit / JGit » Problems setting EGit with github
Problems setting EGit with github [message #641439] |
Thu, 25 November 2010 08:34  |
Eclipse User |
|
|
|
Hi everyone,
I'm a new user of git/github/egit.
I've had the chance of cloning projects from github before, but now I've forked a project to my own repository and I want to work on it in eclipse.
Unfortunately, I've been having a hard time configuring egit, and I can't figure out what I'm doing wrong.
General info:
- Eclipse 3.6.1
- Egit version - latest nightly (have tried with latest stable as well)
- OS: Fedora 13
What I've done so far successfully:
- Created a remote repository pointing to the github repository using https, and managed to fetch everything.
- Create a private and public keys from cli, uploaded the public key to github, and did the ssh test successfully, plus managed to fetch from cli.
- Create a private and public keys from eclipse, uploaded the public key to github, did the cli experiments, all work well.
(*) all generated keys uses a pass phrase.
What I've tried doing, with no luck:
- When configuring the remote repository using https, pushing doesn't work.
- When configuring the remote repository using ssh, fetching and pushing doesn't work. I get 'Auth error', and it doesn't even ask me for the pass phrase (as it should according to various tutorials on the web).
What the tutorials say and I can't do:
- Many tutorials on the web state that the protocol to be used should be git+ssh. Even egit's official user guide says to use it. Unfortunately, the latest stable build and the latest nightly don't have that option anymore.
I'd really appreciate any suggestions on how to move forward. I've been tinkering with it for about two days, with not much luck so far.
Thanks,
Ron
|
|
| |
Re: Problems setting EGit with github [message #641474 is a reply to message #641460] |
Thu, 25 November 2010 10:35   |
Eclipse User |
|
|
|
Thanks for the prompt reply.
I did try the tutorial you've mentioned, and it just doesn't work.
Unfortunately, the tutorial is outdated on at least two points:
1. github's interface has changed
2. as mentioned before, git+ssh doesn't exist anymore (I understand the change you've made, but the fact that it's still in the tutorial is confusing).
What I get after I define the push repository, is the "Push Ref Specifications" window, grayed out, and a few moments after that I get an error popup with 'Auth failed' message.
I don't get the fingerprint message, since I've already accepted it before from cli, and I don't get the passphrase window even though my keys have it.
Any other suggestions? I have a feeling I'm missing something trivial, I just can't find out what.
|
|
| | |
Re: Problems setting EGit with github [message #648898 is a reply to message #643651] |
Sat, 15 January 2011 00:38   |
Eclipse User |
|
|
|
I am also having the same sorts of problems.
I have helios service release 1 (build id 20100917-0705) with pydev and egit just updated today on a Windows Vista machine. I have a free github account with a repository created there.
I have followed the instructions in the egit/github tutorial at http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. egit.doc/help/EGit/User_Guide/Working-with-remote-Repositori es.html.
In particular, I have done the following:
1. I made a pydev project, put it under Git revision control, added and committed two files. That seems to work fine.
2. In Windows > Preferences > Network Connections > SSH2 I have SSH2 Home at: C:\Users\<username>\ssh and these private keys: id_dsa,id_rsa.
In the key management tab I have clicked Generate RSA Key, filled in passphrase and confirmation, saved the private key, and copied the public key and installed at github.
3. In the Git menu, I selected push and filled in the remote repository information as follows:
URI: git+ssh://git@github.com/Name/Repo.git
Host: github.com
Repo path: /Name/Repo.git
Protocol: ssh (git+ssh is not longer an option)
port: empty
user: git
password: empty
store in secure store: checked
When I hit Next I get the Push Ref Specs dialog and this error message:
git+ssh://git@github.com/Name/Repo.git: Auth fail
I am never asked for username, password or passphrase. The first two don't surprise me but I expected to be asked the passphrase.
The github repository is set to SSH mode, though I have also tried the following things with always the same result (auth failed):
URI: git+ssh://github.com/Name/Repo.git
URI: git+ssh://git@github.com:Name/Repo.git
URI: git+ssh://github.com:Name/Repo.git
store in secure store unchecked
Read-only at the github repository
The URIs with colons seem to give trouble in the dialog, though I have seen people recommend to try this for read-only github repositories. However I don't think this is the problem since I have put the repository in SSH mode at github.
Any ideas? Does anyone have this working (pydev + egit + github)? If there is not a fix is there a recommended workaround? Any ideas to diagnose the problem more clearly? Does anyone have a really detailed description for getting this working?
Thanks!
Melissa
|
|
| |
Re: Problems setting EGit with github [solved] [message #648905 is a reply to message #648902] |
Sat, 15 January 2011 05:24   |
Eclipse User |
|
|
|
Ok, I've got it working and it was a key issue, mostly. Here are the main steps if you already have the local repository set up in eGit and files committed and the basic eGit configuration done.
1. Set up the ssh key stuff
a. Download and install mysys git according to the github instructions at http://help.github.com/win-git-installation/
b. In C:/Users/you/ssh hide any existing keys (id_rsa and id_rsa.pub) in a subdirectory. If the ssh directory does not exist, create it. Of course, "you" is your username as the OS knows you.
c. From the start menu, run Git-Bash command shell (a regular DOS command shell will not work).
d. In the Git-Bash shell generate an rsa key based on your email (the one you registered at github):
ssh-keygen -t rsa -C "you@wherever.com"
and enter your pass phrase and confirm when asked.
e. The previous step should have created C:/User/you/ssh/id_rsa.pub which you can now open in a text editor and copy. At github, go to account settings, SSH Keys, add a key and paste this in the key box.
f. In Git-Bash again (notice the back-ticks in the next line):
eval `ssh-agent`
ssh-add C:/User/you/ssh/id_rsa
ssh git@github.com
Here is what you just did: you ran the ssh-agent which is needed by ssh-add. Then you used ssh-add to make note of the location of your key. Then you tried to ssh to git hub. The response to this last command should be that you have successfully authenticated at github but that you don't have shell access. This is just an authentication test. If the authentication was not successful you'll have to sort that out. Try the verbose version: ssh -v git@github.com
Assuming this worked....
2. In eclipse, configure the remote push
a. Window > Show View > Git > Git Repositories will add a repository explorer window.
b. In the repository window, select the repository and expand and right-click Remotes and choose Create Remote.
c. Copy the github repository URI from the github repository page and paste this in the URI box.
d. Select ssh as the protocol but then go back to the URI box and add "git+" at the beginning so it looks like this: git+ssh://git@github.com/UserName/ProjectName.git
e. In the Repository Path box, remove the leading slash
f. Hit next and cross your fingers. If your get "auth fail" restart eclipse and try step 5 again.
g. When you get past the authentication, in the next dialog select "master" for source ref, click "Add all branches spec" and "Finish".
Now try a push to github. This worked for me but with all the fiddling around I'm not sure these instructions are perfect....
Good luck.
Melissa
|
|
| | | |
Re: Problems setting EGit with github [message #655424 is a reply to message #655388] |
Sun, 20 February 2011 14:17   |
Eclipse User |
|
|
|
Padraic,
I'm not an expert at git or ssh keys, but I'm happy to tell you what worked for me, which is to install mysysgit (I'm on a Windows Vista platform) and carefully follow the instructions for setting up the ssh key. This is probably not the most direct method, but it worked for me.
Here is specifically what I did:
1. Download and install mysys git according to the github instructions at http://help.github.com/win-git-installation/
2. In C:/Users/you/ssh hide any existing keys (id_rsa and id_rsa.pub) in a subdirectory. If the ssh directory does not exist, create it. Of course, "you" is your username as the OS knows you.
3. From the start menu, run Git-Bash command shell (a regular DOS command shell will not work).
4. In the Git-Bash shell generate an rsa key based on your email (the one you registered at github):
ssh-keygen -t rsa -C "you@wherever.com"
and enter your passphrase and confirm when asked.
5. The previous step should have created C:/User/you/ssh/id_rsa.pub which you can now open in a text editor and copy.
6. At github, go to account settings, SSH Keys, add a key and paste the key text from your paste buffer into the key box.
7. In Git-Bash again (notice the back-ticks in the next line):
eval `ssh-agent`
ssh-add C:/User/you/ssh/id_rsa
ssh git@github.com
Here is what you just did: you ran the ssh-agent which is needed by ssh-add. Then you used ssh-add to make note of the location of your key. Then you tried to ssh to git hub. The response to this last command should be that you have successfully authenticated at github but that you don't have shell access. This is just an authentication test. If the authentication was not successful you'll have to sort that out. Try the verbose version: ssh -v git@github.com
Good luck,
Melissa
|
|
| | | | |
Re: Problems setting EGit with github [message #722945 is a reply to message #641439] |
Wed, 07 September 2011 05:30   |
Eclipse User |
|
|
|
As this was one of the pages I kept finding with I googled "eclipse egit ssh push auth fail", I thought I'd post the solution I eventually found which works.
Basically, follow Melissa's steps for installing msysgit, creating your keys, and configuring the push/pull remotes in your project's GIT Repo view.
Unlike Meilissa, I didn't have to mess with /'s on path names, or changing type to git+ssh, just copy the ssh URL from your github project and paste it.
If running on Windows, got to prefs, general, networking, ssh2 and make sure the default path is correct, it seems to default to ~/ssh instead of ~/.ssh.
But the real missing piece is ... create the file ~/.ssh/config, and put this in it:
Host github.com
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
After which, when you try your 'dry run' you should finally get promoted for your ssh pass phrase, and it should connect with no problems.
-- hugh
[Updated on: Wed, 07 September 2011 05:32] by Moderator
|
|
|
Re: Problems setting EGit with github [message #1814854 is a reply to message #641474] |
Fri, 20 September 2019 07:11  |
Eclipse User |
|
|
|
Ron Missing name wrote on Thu, 25 November 2010 15:35Thanks for the prompt reply.
I did try the tutorial you've mentioned, and it just doesn't work.
Unfortunately, the tutorial is outdated on at least two points:
1. github's interface has changed
2. as mentioned before, git+ssh doesn't exist anymore (I understand the change you've made, but the fact that it's still in the tutorial is confusing).
What I get after I define the push repository, is the "Push Ref Specifications" window, grayed out, and a few moments after that I get an error popup with 'Auth failed' message.
I don't get the fingerprint message, since I've already accepted it before from cli, and I don't get the passphrase window even though my keys have it.
Any other suggestions? I have a feeling I'm missing something trivial, I just can't find out what.
I have one solution that can be useful, it works for me the maximum time. Just follow these steps: 1) right-click the conflict file 2) click on the replacement → head revision 3) wait several times (hold the patient, it will take time) 4) repeat all the previous steps for all conflict files
|
|
|
Goto Forum:
Current Time: Wed Apr 30 02:26:50 EDT 2025
Powered by FUDForum. Page generated in 0.05301 seconds
|