Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Problems setting EGit with github
Problems setting EGit with github [message #641439] Thu, 25 November 2010 13:34 Go to next message
Ron Missing name is currently offline Ron Missing nameFriend
Messages: 8
Registered: November 2010
Junior Member
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 #641460 is a reply to message #641439] Thu, 25 November 2010 15:12 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 612
Registered: July 2009
Senior Member
EGit currently ignores the password field for the HTTP protocol. We are currently working on this.

We renamed "git+ssh:" to "ssh:" since this confused users and all other git tools use "ssh:". EGit should still support "git+ssh:" but you have to manually type this in in the URI field, this value is not in the combo box anymore. Technically there is no difference.

Did you try our tiny Github tutorial in the EGit user guide [1] ?

[1] http://wiki.eclipse.org/EGit/User_Guide#Github_Tutorial
Re: Problems setting EGit with github [message #641474 is a reply to message #641460] Thu, 25 November 2010 15:35 Go to previous messageGo to next message
Ron Missing name is currently offline Ron Missing nameFriend
Messages: 8
Registered: November 2010
Junior Member
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 #642197 is a reply to message #641474] Tue, 30 November 2010 11:02 Go to previous messageGo to next message
Ron Missing name is currently offline Ron Missing nameFriend
Messages: 8
Registered: November 2010
Junior Member
Anything else? Please?
Re: Problems setting EGit with github [message #643651 is a reply to message #642197] Tue, 07 December 2010 18:25 Go to previous messageGo to next message
VIBrunazo  is currently offline VIBrunazo Friend
Messages: 1
Registered: December 2010
Junior Member
I have the same problem, I cannot push to github using EGit. I'm trying to push using SSH. EGit does asks me for a passphrase and a user name for my rsa key. I tried typing the correct passphrase, leaving it blank. But nothing seems to work. I always get authentication error.

I can easily push from command line using: git push origin master
That works perfectly, and is the workaround I'm using instead of pushing via EGit's interface. Which I can't get to work.

I'm using
- ubuntu 10.10
- Eclipse 3.6.1
- EGit 0.9.3.

I've found a few others reporting the same problems, like this thread. But no solution. Is there any new solution yet?
Re: Problems setting EGit with github [message #648898 is a reply to message #643651] Sat, 15 January 2011 05:38 Go to previous messageGo to next message
Melissa Rice is currently offline Melissa RiceFriend
Messages: 5
Registered: January 2011
Junior Member
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 [message #648902 is a reply to message #648898] Sat, 15 January 2011 06:29 Go to previous messageGo to next message
Melissa Rice is currently offline Melissa RiceFriend
Messages: 5
Registered: January 2011
Junior Member
To elaborate a little more on the colon issue....

I read a post which suggested these fields but the autofill in the dialog prevents this from being entered because each time you edit one field, it changes another one....

URI: "git+ssh://git@github.com:rnavarro/project.git"
Host: "github.com"
Repository path: "rnavarro/project.git"

I also checked the documentation at github but they don't support egit, unfortunately.

Thanks, in advance, for any ideas.

Melissa
Re: Problems setting EGit with github [solved] [message #648905 is a reply to message #648902] Sat, 15 January 2011 10:24 Go to previous messageGo to next message
Melissa Rice is currently offline Melissa RiceFriend
Messages: 5
Registered: January 2011
Junior Member
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 [solved] [message #649907 is a reply to message #648905] Thu, 20 January 2011 22:09 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 612
Registered: July 2009
Senior Member
RTM at http://wiki.eclipse.org/EGit/User_Guide#Github_Tutorial

Why don't you just copy the URI from the github page and paste it into the EGit URI field, this works both with ssh and https protocol for me.
(msohn is my github user id). If you are still on EGit 0.9 you should upgrade to 0.10.

e.g.
git@github.com:msohn/HelloWorld.git
https://msohn@github.com/msohn/HelloWorld.git

To keep things simple you may use the same ssh keys from EGit and msysgit, just point them to the same folder. (On Windows the Eclipse ssh configuration points to ~/ssh instead of ~/.ssh used by msysgit, correct this by changing the path in Eclipse preferences).

You do not need to add git+ in front of ssh, we removed that because nobody else is using this URI scheme form (it's still accepted but no longer used by the combo).
Re: Problems setting EGit with github [solved] [message #650652 is a reply to message #649907] Tue, 25 January 2011 20:43 Go to previous messageGo to next message
Ron Missing name is currently offline Ron Missing nameFriend
Messages: 8
Registered: November 2010
Junior Member
Hello Matthias,
I'm not sure whether your reply was directed to Melissa or to me.
Just a few points:
1. For me, the issue was solved a couple of weeks ago upon upgrading the latest nightly without me changing anything in the configuration. It most certainly didn't work with the nightly build when I originally made the post.
2. It's obvious that you've updated the EGit manual to comply both with github's changes and EGit's changes. Again, when you originally replied, it wasn't updated.

While I'm sorry the response took a while, I do appreciate the work you're doing on the plug-in and the constant effort you put into it.

Thanks,
Ron
Re: Problems setting EGit with github [message #655388 is a reply to message #641439] Sun, 20 February 2011 11:11 Go to previous messageGo to next message
Padraic Harley is currently offline Padraic HarleyFriend
Messages: 1
Registered: February 2011
Location: Ireland
Junior Member
Hi there,

I too had a problem with Egit, Github and SSH. I followed the push instructions in the tutorial. After entering in the url and clicking 'next' a pop-up would come up with 'username: git' ; 'passphrase: '. There didn't seem to be any passphrase entry that would satisfy it and would continue to pop up after clicking 'ok'. Didn't work for either ssh:// or git+ssh://

I tried it on Galileo and Helios. Egit is 0.11.1. Running Ubuntu 10.10.

I have everything working through https but just wanted to mention it. If there is a way to fix it, feel free to drop me a reply Smile
Re: Problems setting EGit with github [message #655424 is a reply to message #655388] Sun, 20 February 2011 19:17 Go to previous messageGo to next message
Melissa Rice is currently offline Melissa RiceFriend
Messages: 5
Registered: January 2011
Junior Member
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 [solved] [message #655425 is a reply to message #649907] Sun, 20 February 2011 19:20 Go to previous messageGo to next message
Melissa Rice is currently offline Melissa RiceFriend
Messages: 5
Registered: January 2011
Junior Member
Matthias,

Thanks very much for you reply. Sorry for the delay in my response.

I did follow the tutorial (some version at least) and found it mostly very thorough and well-written - Thank You.

The problem turned out to be with the key, for which there was little information in the version of the tutorial I was reading. I resolved the problem by following the more comprehensive instructions with mysysgit. I'm quite busy with a project right now but sometime in the next couple months I hope to carve out more time to install eGit on another machine, at which point I will try following the instructions you point to and will let you know what part, if any, is unclear or not working as expected.

The root problem is undoubtedly that I am new to eclipse, git, and ssh-keys.

Thanks again for your thoughtful response and for taking the time to write the tutorial. Much appreciated.

Melissa
Re: Problems setting EGit with github [message #665168 is a reply to message #641439] Wed, 13 April 2011 14:34 Go to previous messageGo to next message
Andy  is currently offline Andy Friend
Messages: 1
Registered: April 2011
Junior Member
I'm getting the same auth exception as people above with a github account. But, I cloned a repo at the command line, edited a file, committed and pushed successfully, so I know my ssh key is configured and passphrase working. Within eclipse, under Preferences -> General -> Network Connections -> SSH2 (Key Management tab), I'm attempting to Load Existing Key... and I get the error: "Failed to decrypt id_rsa". Any idea what that means? And are my auth problems because my key isn't loaded here?

Andy
Re: Problems setting EGit with github [message #673987 is a reply to message #641439] Wed, 25 May 2011 12:28 Go to previous messageGo to next message
Julius Foitzik is currently offline Julius FoitzikFriend
Messages: 1
Registered: May 2011
Junior Member
Note that you have 2(!) different URIs.

PULL
PUSH

You have to configure the PUSH URI.
EGIT adds a (nonsense?) port to the SSH URI.
Remove the port and add "git+" in front of the URI.

hxxp://imagr.eu/up/4ddcf5150a2621_egit-ssh-git-fix.png


This fixes "connection refused".
This fix is not proven for "auth fail".

I fixed "auth fail" by avoiding whitespace artifacts while copy pasting the key from Eclipse into GitHub (any hoster).
(Assembla has problems with processing key files created under Windows by using PuTTyGen).
Re: Problems setting EGit with github [message #674425 is a reply to message #673987] Thu, 26 May 2011 21:22 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 612
Registered: July 2009
Senior Member
There was a bug [1] with the recently added Clone Wizard page for Gerrit push configuration which even added the default Gerrit configuration (ssh on port 29418) if this wasn't selected by the user. This issue was fixed this week.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=346806
Re: Problems setting EGit with github [message #722945 is a reply to message #641439] Wed, 07 September 2011 09:30 Go to previous message
Hugh Messenger is currently offline Hugh MessengerFriend
Messages: 17
Registered: January 2010
Junior Member
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 09:32]

Report message to a moderator

Previous Topic:Archive/package for manual installation
Next Topic:SOLVED - Newbie - compiling a branch
Goto Forum:
  


Current Time: Sun Dec 21 01:56:23 GMT 2014

Powered by FUDForum. Page generated in 0.02658 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software