IT story

github : 지원되는 인증 방법이 없습니다.

hot-time 2020. 8. 28. 08:01
반응형

github : 지원되는 인증 방법이 없습니다.


나는 github를 사용하고 과거에 내 노트북에 성공적으로 파일을 추가하고 동기화했습니다.

최근에 나는 실행 후 " PuTTY 치명적 오류 : 연결 끊김 : 지원되는 인증 방법 없음 "을 받기 시작했습니다 .

git pull origin master (또는 push)

하나

ssh git@github.com에서 올바른 응답을 반환합니다. 오류 : 안녕하세요 사용자 이름! 성공적으로 인증되었지만 GitHub는 github.com에 대한 셸 액세스 연결을 제공하지 않습니다.

github에서 파헤쳐 본 후 나는이 소포를 발견했습니다.

지원되는 인증 방법 이 없습니다. ssh가 작동하지 않는 경우 git에서 ssh를 사용하는 클라이언트를 찾는 데 사용하는 환경 변수 GIT_SSH를 알고 있어야합니다. git install은 인증을 수행하기 위해 plink.exe (GIT_SSH를 통해)를 사용할 수 있습니다. 그렇다면 pageant.exe가 실행 중이고 github 용으로 생성 한 키가로드되었는지 확인하십시오. 이것은 plink.exe에 대한 키를 제공합니다. 그것 없이는 위의 오류가 발생합니다.

plink.exe 또는 peagant.exe가 무엇인지 확실하지 않습니다. ssh git@github.com이 올바르게 인증하는 것 같다는 사실 때문에 여기에서 가장 좋은 솔루션이 무엇인지 궁금합니다. 그렇지 않은 경우 설정을 지나치게 복잡하게 만들고 싶지는 않습니다. 필요한.


홈 디렉토리에 ".profile"이라는 파일을 만들 수 있습니다. 저에게는 C : \ Users \ [user]입니다.

해당 파일 안에 다음 코드 줄을 넣으십시오.

GIT_SSH="/usr/bin/ssh.exe"

이렇게하면 GIT_SSH 환경 변수가 git에 포함 된 ssh 클라이언트를 사용하도록 설정됩니다.

.profile 스크립트는 Git Bash 명령 줄을 시작할 때 실행됩니다.

편집 : 이것은 내 .profile입니다. git 명령 프롬프트를 처음 시작할 때 암호를 묻는 메시지가 표시되고 컴퓨터를 재부팅 할 때까지 그때부터 암호를 기억합니다. 매우 편리하여 무언가를 할 때마다 암호를 계속 입력 할 필요가 없습니다.

SSH_ENV="$HOME/.ssh/environment"
GIT_SSH="/usr/bin/ssh.exe"

function start_agent {
echo "Initializing new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}

# Source SSH settings, if applicable
if [ -f "${SSH_ENV}" ]; then
. "${SSH_ENV}" > /dev/null
#ps ${SSH_AGENT_PID} doesn't work under cygwin
ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
start_agent;
}
else
start_agent;
fi

TortoiseGit 사용

TortoiseGit> 설정 ... 네트워크 ... SSH 클라이언트 : C:\Program Files\Git\usr\bin\ssh.exe

내 위치는 다릅니다. 한 컴퓨터에서C:\Program Files (x86)\Git\bin\ssh.exe

거북이


"... plink.exe 또는 peagant.exe가 무엇인지 잘 모르겠습니다 ..."

당신이 묻기 때문에 : plink & pageant는 Linux & Windows를 지원하고 Windows에서 완전히 지배적 인 SSH 구현 인 PuTTY 제품군의 일부입니다.

SSH

Secure Shell (SSH) is a cryptographic network protocol for securing data communication. It establishes a secure channel over an insecure network in a client-server architecture, connecting an SSH client application with an SSH server. Common applications include remote command-line login, remote command execution, but any network service can be secured with SSH.

if you ever used Telnet, it's like that (but more secure): it allows you to remotely access the bash shell (command line) of a Linux host.

PuTTY

PuTTY is a free and open-source terminal emulator, serial console and network file transfer application. It supports several network protocols, including SCP, SSH, Telnet, rlogin ...

On Windows it's the dominant software for remotely accessing a Linux host's command line under the SSH protocol (above). In Windows, .exe extensions are for executables. So those notes about plink.exe & pageant.exe probably don't apply if you're in Linux. PuTTY includes

Plink: a command-line interface to the PuTTY back ends

Pageant: an SSH authentication agent for PuTTY, PSCP and Plink

From (http://en.wikipedia.org/wiki/Secure_Shell#Key_management)

When the public key is present on the remote end and the matching private key is present on the local end, typing in the password is no longer required ... for additional security the private key itself can be locked with a passphrase.

So github is hosted on a Linux machine and uses SSH to secure the connection. SSH either authenticates with passwords or keys, many hosts (github?) only authenticate with keys. You setup is apparently trying to authenticate with a key. Keys and hosts are not one-for-one: you can have two keys for the same host and/or two hosts for the same key, so they need to be managed. If you are in Windows, then your SSH session is probably accessed through plink and your keys are probably managed by Pageant.

Import the key you need each time you load Pageant. If you followed guides that said "import your key", and saw that it worked, but it doesn't work now, see Chapter 9: Using Pageant for authentication.

One last tip if you are on Windows: you may have multiple instances of the PuTTY suite installed by various tools. TortoiseGit, for example, installs its own.


I experienced this problem because my GIT_SSH was pointing to the TortoiseSVN version of Plink.exe. I changed it to point to the TortoiseGit version, restarted cmd and it worked.

I can't remember exactly, but the TortoiseSVN version might have been 32-bit version, and the TortoiseGit version was 64-bit (located in Program Files, not Program Files (x86)).

Double-check your GIT_SSH env var.

I prefer to use git with normal cmd.exe (in Console2 of course)


For TortoiseGit Users on Windows

Originally, I used to setup most of my Github/Bitbucket repositories using the SSH repository URLs as (originally) it used to be the only convenient way to prevent TortoiseGit from prompting for your password on every single action.

But setting TortoiseGit up this way was always hair-pullingly painful. Every time it took me hours to set up correctly, as the default installation options never seemed to work (even as of 2016, sheesh!).

But TortoiseGit now has better password management for HTTPS, and Github actually recommends using HTTPS URLs wherever possible.

SSH URL: git@github.com:User/repo-name.git

HTTPS URL: https://github.com/User/repo-name.git

The benefits of HTTPS are:

  • No managing or generating of SSH keys
  • No need to have pageant.exe constantly running (which requests your password on each launch)
  • Using TortoiseGit from Australia, I find that clones over HTTPS are 5-10x faster than SSH

If you're using Pageant and are getting the error described in the question after rebooting your PC (or otherwise closing and reopening Pageant):

The error can be caused by Pageant not having your GitHub SSH key actively loaded. By default, Pageant does NOT automatically load the keys from the previous session when it starts up.

To load the key:

  1. Open Pageant. (On Windows, if Pageant is running, it'll have an icon in the system tray. Double-click that.)
  2. Click the Add Key button, and proceed to add your existing GitHub SSH key.

To avoid this problem in the future, you can configure Pageant to automatically load your key when it starts up. (Pageant will automatically prompt you for a password if your key is password-protected.)

Steps to do this (assuming you already have Pageant configured to run when Windows starts):

  1. Find the shortcut used by Windows to run Pageant when Windows starts. (It may be in the Startup folder, which can be opened by Start > Run > shell:startup)
  2. In the shortcut's Properties dialog, append the full path and filename of the SSH key file to the "Target" field.

Reference and full details: http://blog.shvetsov.com/2010/03/making-pageant-automatically-load-keys.html


My issue was that I was attempting to use my github username. Apparently when using Github (or is it a Git thing?), if you use key-based authentication, you need to set your username to git.

I'm not sure why you even need a username at all - perhaps someone more knowledgeable can explain that?


On my Windows 7 machine running Github for Windows using git version 1.8.3.msysgit.0. I found that updating my system environment variable GIT_SSH to C:\Program Files (x86)\Git\bin\ssh.exe seemed to do the trick. This also fixed my issue with contacting OpenShift's git repo.


Worked for me on Windows 8: GIT_SSH variable was pointing to plink.exe, Changed it in the system settings to point to the ssh binary, and that has fixed the problem. To find out full path to the ssh, run:

where ssh

Same error, different solution noted here - Problem connecting to GitHub on Windows, even via PuTTY


I encountered this same problem, however the GIT_SSH solution appeared to work once for me. After a computer restart I realized it was something else, as I was able to clone my private repositories with no problem using Git Bash or Command Prompt, but not in Sublime Text 3 with the SublimeGit plugin. My solution was simple and is actually what @BlueRaja - Danny Pflughoeft mentioned but I thought it could use some direction ;)

Basically you just need to edit ~/.ssh/config and ensure the username is git. You can also tell it to use a specific SSH key for Github -- My ~/.ssh/config file looks like the following:

Host gh
    Hostname github.com
    User git
    IdentityFile ~/.ssh/github_rsa.pub

I have a specific key for Github due to the number of other things I do throughout my day, but if you've only got one then it usually will be ~/.ssh/id_rsa.pub like Github explains here.

I know everyone has a different solution, but I'll leave this here for anyone who may encounter this article without a fix. Good luck!


I got this error when using TortoiseGit to clone a repository from GitHub. Fixed by clicking "Load Putty Key" and selecting a key file (*.pkk) in the Git clone dialogue.


To resolve this issue this was what I did.

I was using Git Bash on Windows 10

I started Pageant, pressed Add Key,

여기에 이미지 설명 입력

navigated to C:\Users\username\.ssh folder and chose my key

여기에 이미지 설명 입력

I then attempt to do a git push and it worked this time.


여기에서 plink & pageant를 얻을 수 있습니다 : http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

그들은 PuTTY 도구입니다.


이 문제가 발생했습니다 (직접 ssh가 작동했지만 git pull 실패). 내 git remote가 내가 생각했던 것과 같지 않기 때문입니다.

예, 예, 어리석은 실수라는 것을 알고 있지만 실제로 발생하고 확인해 볼 가치가 있습니다.

사용하다 git remote -v

참고 URL : https://stackoverflow.com/questions/3431314/github-no-supported-authentication-methods-available

반응형