"Auth Failed" Error Using EGit and GitHub

I installed the EGit plugin in Eclipse Helios and I try to use it with my GitHub account, but when I try to configure it, I get an "Auth Failed" error message.

I searched for it, but no luck ... it seems to be a problem with my passphrase, but AFAIK EGit looks in the right place ( /home/user/.ssh/id_rsa ) and I have no problems connecting with ssh or git client console

Some blogs say this is a problem with the URI and the Egit parser, but I still haven't found a solution.

+96
eclipse github egit
Aug 30 '10 at 15:26
source share
24 answers

My answer may be outdated, but hopefully it can be useful to someone.

  1. In your Eclipse, go to Window> Settings> General> Network Connections> SSH2 (or just enter "SSH2" in the filter window of the settings window).

  2. On the Key Management tab , click the Create RSA Key ... button. If you wish, you can add a comment (usually an email address) and a passphrase to your key. Passphrase will be used during authentication on GitHub.

  3. Copy your generated public key (in the box below "Create RSA key ...") and add it to your GitHub account.
  4. Click the "Save Private Key ..." button to save your RSA private key to a file. By default, keys are stored in the SSH2 home directory (see the General tab).

It! Now you can push your code to the GitHub repository.

+132
May 11 '11 at 1:33 pm
source share

I had exactly the same problem, but I found the cure from the Eclipse error report!

For the environment variable named GIT_SSH, the path to the ssh executable file [1] must be set.

For example, on Ubuntu Linux (10.10 64 bit):

 > export GIT_SSH=/usr/bin/ssh > eclipse 

After that, it pushes the GitHub repository to work, as expected. I tested this with Eclipse Galileo and Indigo.

The problem is really annoying, and the solution is far from pleasant. For now, for the solution to be permanent, at least for Ubuntu users, you need to make the env variable permanent. This can be done by adding the export command to ~ / .profile or ~ / .bashrc [2]. For example:

 > cd ~ > echo "export GIT_SSH=/usr/bin/ssh" >> .profile 

And then restart Eclipse to take effect.

Sources:

+27
02 Oct '11 at 23:32
source share

I resolved it by selecting http as the protocol and providing my GitHub username and password.

+15
Sep 17 '11 at 18:51
source share

After spending hours searching for a solution to this problem, I finally hit the gold by making the changes mentioned at the Eclipse Forum .

Steps:

Prerequisites: mysysgit is installed with the default configuration.

1.Create a C: /Users/Username/.ssh/config file (replace "Username" with your Windows 7 username (for example, C: /Users/John/.ssh/config) and put this in this:

 Host github.com HostName github.com User git PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa 

2. Try setting up a remote repository now in Eclipse.

Greetings. It should work fine.

+9
Mar 03 '12 at 14:30
source share

You need to install msysgit, after installation you need to open Git Bash and enter the following commands there:

 $ git config --global user.name "Gennadiy Zlobin" (your name) $ git config --global user.email gennad.zlobin@gmail.com (your email) $ ssh-keygen -C "gennad.zlobin@gmail.com" -t rsa (your email) 

Now your generated keys are located in C:\Users\username\.ssh (on Windows 7).
Then you upload the contents of your public key to your Github project
In Eclipse, open Window->Preferences->General->Network->SSH2 and set ~/.ssh as SSH Home

After that, go to the Key Management tab and Download the existing key - enter your private key here in ~/.ssh .

After that, you can redirect your project to Github (but I installed the ssh protocol, not git + ssh).

+8
Nov 15 2018-10-15
source share

I solved the same problem with adding my key to ssh;

 ssh-add ~/.ssh/id_rsa 

then enter the passphrase and need to restart.

+5
Oct 14 '11 at 12:51
source share

For * nix users who use SSH:

Make sure the username for your account on your local computer is not different from the username for the account on the server. Apparently, eGit does not seem to handle this. For example, if your username on your local computer is β€œjohn” and the account you use on the server is called β€œgit”, for example, you just cannot connect (for me anyway). The only work I found was to make sure that you have the same usernames on both the local computer and the server.

+4
Jul 23 2018-12-23T00:
source share
+3
Jan 15 '11 at 10:38
source share

My fourpenneth: my SSH keys were configured in Cygwin, in C: \ cygwin \ home \ <user> .sh, so I pointed SSH to this folder instead of the standard (Win7) C: \ Users \ <; user> \ ssh, according to these instructions: http://wiki.eclipse.org/EGit/User_Guide/Remote#Eclipse_SSH_Configuration

and used the ssh protocol and it works fine. Trying to use the git protocol still gives "The user is not supported in the git protocol."

+2
Jan 04 '12 at 11:19
source share

For you, who, like me, have already installed ssh keys for you, but still get errors:

Make sure to configure push remote . This worked for me when I received both Can and non-deleted refs-problems repositories ("... Passphrase for ..." and "Auth fail" in the "Push ..." dialog box).

If you are already:

  • Configure your SSH keys using Github (Window> Settings> General> Network Connections> SSH2)

  • Install a local repository (you can follow this guide )

  • Created a Github repository ( same pointer )

... this is how you do it:

  • Go to the Git Repositories view (window> Show view> Other> Git Repositories)
  • Expand your repository and right click -> "Create Remote"
  • "Remote name": start, "Configure push": checked β†’ , click "OK"
  • Click the "Change ..." button.
  • Insert your Git URI and select the ssh protocol β†’ click Finish
  • Now click "Save and click" , and now you should receive a password prompt β†’ enter the public key passphrase here (provided that you DID (and you must) set the passphrase for your public key) β†’ click "OK"
  • Now you should get a confirmation window that says: "Squeezed into your repository - origin" β†’ click "OK"
  • Push to upstream , but this time use the "Configured Remote Repository" as your Git repository
  • Go get yourself a well-earned cup of coffee!
+2
Sep 01 '13 at 21:05
source share

I updated the nightly build plugin: http://www.eclipse.org/egit/download/

With the update, this worked for me. (Eclipse Helios, Mac OS X)

+1
Sep 22 '10 at 16:07
source share

Have you tried using ssh protocol instead on git + ssh? I have the same problem and I decided to solve it, although the official documentation says use git + ssh

+1
Nov 27 '10 at 0:36
source share

On Windows, setting GIT_SSH in openssh, which comes with msys git, did not work (Eclipse hung during commit). Installing it in TortoisePlink solved the problem (I think the original plink will work too). Added bonus Eclipse now uses keys stored in the contest.

+1
Jan 16 '12 at 18:22
source share

I solved this by choosing https as the protocol and then adding my github username and password

+1
Mar 02 '14 at 9:01
source share

In your GIT view, where you have your repositories, you will see a structure such as:

  • branches
  • tags
  • links
  • reverts
  • etc...

Click on the remotes, right-click on the URL of the repository and select "Change credentials."

+1
Mar 08 '16 at 10:43
source share

I found a post on the Eclipse forums that solved this problem for me.

0
Oct 27 '11 at 19:06
source share

I had the same issue, which seemed to come down to a configuration issue. A ssh private key was created in the github mac osx application named github_rsa

In your Eclipse, go to Window > Preferences > Network Connections > SSH2

On the general tab, you should see SSH2 home /Users/<you username>/.ssh , you will probably see id_dsa, id_rsa, defined as private keys.

Click "Add Private Key" and select github_rsa located at /Users/<you username>/.ssh

0
Apr 12 '13 at 16:47
source share

If you have a PEM file . In Eclipse, go to Window> Preferences> Network Connections> SSH2, and then add the path to your PEM file to Private Keys and this should fix the problem.

0
Apr 26 '13 at 23:25
source share

I wanted to make it public as soon as I also fixed the Google code and got the same error. Started with This video, but received error while saving and publishing. I saw that there are several questions regarding this. Some of them are Windows users, these are the most successful, because usually there are no permissions problems, and some of them are Linux users.

I have a mac to use mobile applications and very often meet these problems. The source of these problems are "platform-independent" solutions that do not care about the Mac, and they do not have access to the key chain where certificates, .pem files, etc. are stored.

All I wanted to do was not make any environment settings, nor the command line, just clicks based on the graphical interface, like a regular user.

Half of the part was done with the Eclipse Git plugin, the second part (clicking on Github) was done with Mac Github

Nice and easy :)

Everything can be done using this native application, if I start to study it, I just need the push function from it.

Hoping this helps the Mac user once.

0
Sep 14 '13 at 9:38 on
source share

I found that if I set up two-step authentication on github, Eclipse will not be able to connect to Github - this makes sense because two-step authentication on github requires you to enter a number from SMS (and Eclipse will not have this information).

If this is your scenario, you might consider disabling 2-step verification on github and see if that helps.

0
Oct. 16 '13 at 20:07 on
source share

For existing ssh keys, I think this is a bug in Eclipse Juno 3.8.

What I've done:

1) Download the existing key by going to: Window> Settings> "Search ssh"> "Key Management" tab> "Download existing key"> select the private key that you already have

2) Save this key by clicking the Save Private Key button. Name it id_dsa_github

3) Now check if push and pull are working or not. It should be.

4) Now on the general tab, delete the id_dsa_github private key and add your previous private key by clicking the Add private key button

Now you are good to go. At least once to do everything from EGit to register, I think.

0
Mar 04
source share

I am facing the same question.

I thought this was due to my credentials and authentication.

Then, finally, I realized that the URI I configured is not an HTTP option.

I tried to click on the SSH URI of my Git with the HTTP configuration.

Check your URL in

Git Perspective> Remotes> Origin> Fetch Configuration> Edit> Make sure prtocal is HTTPS and the URL is https version .

0
Jul 30 '18 at 5:30
source share

I could use the console to push / pull repositories, but not in eclipse. In my case, eclipse does not seem to be able to read my SSH private key, my key started with:

 -----BEGIN OPENSSH PRIVATE KEY----- 

And I noticed that my colleague key started with:

 -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED 

I think that currently eclipse cannot use this new key type (OPENSSH PRIVATE KEY).

I decided: Regenerate your ssh key with the command:

 ssh-keygen -m PEM -t rsa -b 2048 

This will use the old key generation method: therefore, it will start with the headers:

 -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED 

see additional information about:

https://github.com/duplicati/duplicati/issues/3360

Then you can upload the key again in eclilpse using "Settings" β†’ "Network Connections" β†’ SSH2, click "Add Private Key" (still select your private key even if you already see its name in the list of private keys, since eclipse reload it)

0
Dec 04 '18 at 16:02
source share

And indeed, I am simply always amazed at the wonderful things you serve. Some four facts on this page are undoubtedly the most effective Ive been. https://www.slajobs.com/java-training-in-chennai/

0
Jul 20 '19 at 8:31
source share



All Articles