Programing

EGit 및 GitHub의 '인증 실패'오류

lottogame 2020. 8. 21. 08:24
반응형

EGit 및 GitHub의 '인증 실패'오류


Eclipse Helios에 EGit 플러그인을 설치했고 내 GitHub 계정과 함께 사용하려고하는데 구성하려고하면 "Auth Failed"오류가 발생합니다.

나는 그것을 인터넷 검색했지만 운이 없었습니다 ... 내 암호에 문제가있는 것 같지만 AFAIK EGit이 올바른 위치 ( /home/user/.ssh/id_rsa)를 찾고 있으며 연결 ssh또는 git콘솔 클라이언트에 문제가 없습니다 .

일부 블로그는 이것이 URI와 Egit의 파서에 문제라고 말하지만 여전히 해결책을 찾지 못했습니다.


내 대답은 구식 일 수 있지만 누군가에게 유용 할 수 있습니다.

  1. Eclipse에서 창> 환경 설정> 일반> 네트워크 연결> SSH2로 이동하십시오 (또는 환경 설정 창 필터 상자에 "SSH2"를 입력하십시오).

  2. 에서 "키 관리" 탭을 눌러 "RSA 키 ... 생성" 버튼을 클릭합니다. 선택적으로 댓글 (일반적으로 이메일 주소)과 암호를 키에 추가 할 수 있습니다. 암호는 GitHub에서 인증하는 동안 사용됩니다.

  3. 생성 된 공개 키 ( "RSA 키 생성 ..."버튼 바로 아래 상자에 있음)를 복사하여 GitHub 계정에 추가합니다.
  4. 누르면 "저장 개인 키는 ..." 버튼을 파일에 개인 RSA 키를 저장합니다. 기본적으로 키는 SSH2 홈 디렉토리에 저장됩니다 ( "일반"탭 참조).

그게 다야! 이제 코드를 GitHub 저장소로 푸시 할 수 있습니다.


나는 똑같은 문제가 있었지만 Eclipse 버그 보고서에서 치료법을 찾았습니다!

GIT_SSH라는 환경 변수는 ssh 실행 파일 [1]에 대한 경로로 설정되어야합니다.

예를 들어 Ubuntu Linux (10.10 64 비트)의 경우 :

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

그 후 GitHub 저장소로 푸시하면 정상적으로 작동합니다. Eclipse Galileo와 Indigo로 이것을 테스트했습니다.

문제는 정말 짜증나고 해결책은 좋지 않습니다. 지금은 적어도 우분투 사용자를 위해 솔루션을 영구적으로 만들려면 env 변수를 영구적으로 만들어야합니다. ~ / .profile 또는 ~ / .bashrc [2]에 export 명령을 추가하여 수행 할 수 있습니다. 예를 들면 :

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

그런 다음 Eclipse를 다시 시작하여 적용하십시오.

출처 :


http프로토콜 로 선택 하고 GitHub 사용자 이름과 암호를 제공 하여 문제를 해결했습니다 .


이 문제에 대한 해결책을 찾기 위해 몇 시간을 보낸 후 마침내 Eclipse Forum 에 언급 된 변경 사항을 적용하여 금메달을 땄습니다 .

단계 :

전제 조건 : mysysgit은 기본 구성으로 설치됩니다.

1. C : /Users/Username/.ssh/config 파일을 만들고 ( "Username"을 Windows 7 사용자 이름으로 바꿉니다. (예 : C : /Users/John/.ssh/config)) 다음과 같이 입력합니다.

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

2. Eclipse에서 원격 저장소를 설정해보십시오.

건배. 완벽하게 작동합니다.


msysgit을 설치해야합니다. 설치 후 Git Bash를 열고 다음 명령을 입력해야합니다.

$ 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)

이제 생성 된 키가 C:\Users\username\.ssh(Windows 7)에 있습니다.
다음으로
Eclipse 에서 Github의 프로젝트에 공개 키의 내용을로드하고 SSH 홈 으로 Window->Preferences->General->Network->SSH2설정합니다.~/.ssh

그 이동에 후 Key Management tab키를 기존로드 - 여기에서 개인 키를 설정합니다 ~/.ssh.

그 후 프로젝트를 Github에 푸시 할 수 있습니다 (하지만 git + ssh가 아닌 ssh 프로토콜을 설정했습니다).


ssh에 키를 추가하여 동일한 문제를 해결했습니다.

ssh-add ~/.ssh/id_rsa 

그런 다음 암호를 입력하고 다시 시작해야합니다.


SSH를 사용하는 * nix 사용자의 경우 :

로컬 컴퓨터의 계정 사용자 이름이 서버의 계정 사용자 이름과 다르지 않은지 확인하십시오. 분명히 eGit은 이것을 처리 할 수없는 것 같습니다. 예를 들어 로컬 컴퓨터의 사용자 이름이 'john'이고 서버에서 사용중인 계정의 이름이 'git'인 경우 egit은 연결에 실패합니다. 내가 찾은 유일한 해결 방법은 로컬 컴퓨터와 서버 모두에서 동일한 사용자 이름을 가지고 있는지 확인하는 것입니다.


At the link below I posted what worked for me...

http://www.eclipse.org/forums/index.php?t=msg&goto=648905&S=9bcfa96ab726d744d41a19c7fb02d723#msg_648905


My fourpenneth: my SSH keys were set up in Cygwin, at C:\cygwin\home\<user>.ssh, so I pointed SSH to this folder instead of the default (Win7) C:\Users\<user>\ssh, as per 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 "User not supported on the git protocol", though.


For you who, like me, already did setup you ssh-keys but still get the errors:

Make sure you did setup a push remote. It worked for me when I got both the Cannot get remote repository refs-problems ("... Passphrase for..." and "Auth fail" in the "Push..." dialog).

Provided that you already:

  1. Setup your SSH keys with Github (Window > Preferences > General > Network Connections > SSH2)

  2. Setup your local repository (you can follow this guide for that)

  3. Created a Github repository (same guide)

... here's how you do it:

  • Go to the Git Repositories view (Window > Show View > Other > Git Repositories)
  • Expand your Repository and right click Remotes --> "Create Remote"
  • "Remote Name": origin, "Configure push": checked --> click "OK"
  • Click the "Change..." button
  • Paste your git URI and select protocol ssh --> click "Finish"
  • Now, click "Save and Push" and NOW you should get a password prompt --> enter the public key passphrase here (provided that you DID (and you should) setup a passphrase to your public key) --> click "OK"
  • Now you should get a confirmation window saying "Pushed to YourRepository - origin" --> click "OK"
  • Push to upstream, but this time use "Configured remote repository" as your Destination Git repository
  • Go get yourself a well earned cup of coffee!

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

With an update, it worked for me. (Eclipse Helios, Mac OS X)


Have you tried to use the ssh protocol instead on git+ssh ? I've got the same problem, and that solved it, even though official documentation tells to use git+ssh


On Windows, setting GIT_SSH to openssh that comes with msys git didn't work (Eclipse hung during commit). Setting it to TortoisePlink solved the problem (I guess original plink would work as well). The added bonus is now Eclipse uses keys stored in pageant.


I resolved it by selecting https as the protocol and then adding my github username and password


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

  • branches
  • tags
  • references
  • remotes
  • etc...

Click on remotes, right-click on the url of the repository there and select 'Change Credentials'.


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


I was having the same issue which it seems was down to config issue. The github mac osx app had created a ssh private key called github_rsa

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

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

Click 'Add private key' and select github_rsa located /Users/<you username>/.ssh


IF YOU HAVE PEM FILE: In Eclipse go to Window > Preferences > Network Connections > SSH2, and then add path to your PEM file to "Private keys" and that should solve the problem.


I wanted to make public once me too a google code fix and got the same error. Started with This video, but at Save and publish got an error. I have seen there are several question regarding to this. Some are Windows users, those are the most lucky, because usually no problems with permissions and some are Linux users.

I have a mac for mobile development use and very often meet this problems. The source for this problems is the "platform independent" solutions, which doesn't care enough for mac and they don't have access to keychain, where are stored the certificates, .pem files and so on.

All I wanted is to not make any environment settings, nor command line, just simple GUI based clicks, like a regular user.

Half part was done with Eclipse Git plugin, second part (push to Github) was done with Mac Github

Nice and easy :)

All can be done with with that native appp if I would start to learn it, I just need the push functionality from him.

Hoping it will help a mac user once.


I discovered that if I set up the two-step authentication in github, Eclipse isn't able to connect to Github - which makes sense because the two-step authentication in github requires you to input a number from an SMS (and Eclipse wouldn't have this information).

If this is your scenario, you might consider de-activating your two-step authentication in github, and see if that helps.


For existing ssh keys, I think that it's a bug in Eclipse Juno 3.8.

What I did:

1) Load the existing key by going to: Window > Preferences > "Search ssh" > Key Management Tab > Load Existing Key > Select the private key which you already have

2) Save that key by clicking the button Save Private Key. Let's name it id_dsa_github

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

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

Now you are good to go. It's taking at least one time to do all the things from EGit to register, I guess.


I run into the same issue.

I thought it's something to do with my credentials and authentication.

Then finally I realised it's the URI I configured is not HTTP variant.

I was trying to push to SSH URI of my Git with HTTP configuration.

Check your URL in

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


I could use console to push/pull the repositories, but no in eclipse. In my case, eclipse seems can't read my SSH private key, my key started with:

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

And I noticed my colleague's key started with:

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

I think currently eclipse can't take this new kind of key (OPENSSH PRIVATE KEY).

I solved it by: Regenerate your ssh key by using command:

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

This will use the old way to generate the key: so it will starts with the headers:

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

see more information on:

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

Then you can load the key again in eclilpse by using Preferences -> Network connections -> SSH2, click "Add Private Key" (still select your private key, even you already see the name in the list of private keys, because eclipse has to reload it)

참고URL : https://stackoverflow.com/questions/3601805/auth-failed-error-with-egit-and-github

반응형