2016-08-16 1 views
9

This page 등 많은 사람들이 git으로 osxkeychain 자격 증명 도우미를 설정하는 방법에 대한 지침을 제공합니다. 나는이 지침을 따랐다. 모든 것이 잘 작동하는 것처럼 보였다. Keychain Access 응용 프로그램의 사용자 이름과 암호가 정확하고 git-credential-osxkeychain이 github.com 레코드에 액세스 할 수 있음을 알 수 있습니다. git config -l을 입력하면 credential.helper=osxkeychain 항목뿐만 아니라 올바른 user.name 및 user.email 항목을 볼 수 있습니다. git credential-osxkeychain을 실행할 때 나는 분명히 가정 된 사용법 메시지를 봅니다. 어떤 시점에서라도 오류 메시지가 나타납니다. 모든 것이 제대로 설정된 것 같습니다.git : osxkeychain 자격증 명 도우미가 자동으로 사용자 이름/암호를 기억하지 못함

그러나 특정 저장소를 몇 번이나 눌러도 항상 내 사용자 이름과 암호를 묻습니다. 내 Keychain Access 항목에있는 사용자 이름과 암호를 입력하면 작동합니다. 그래서 그것은 로그인 문제로 보이지 않습니다. 또한 git credential-osxkeychain erase (또는 git-credential-osxkeychain erase)을 입력하면 자동으로 명령이 중단되고 알 수있는 한 무기한 중단됩니다.

아직까지이 문제를 문서화 한 것을 찾을 수 없었습니다. This question도 유사한 문제를 제기하지만 git 버전은 2.6.4이므로 솔루션이 도움이되지 않습니다. 왜 이렇게하고 osxkeychain 자격 증명 도우미로 내 사용자 이름과 암호를 기억해야합니까?

Mac OS X 10.11.4 및 git 버전 2.6.4를 사용하고 있습니다.

+1

같은 문제. Mac OS X 10.12.2, git 2.11.0. –

+0

이게 이거 야? http://superuser.com/questions/1127067/macos-keeps-asking-my-ssh-passphrase-since-i-updated-to-sierra –

답변

8

~/.ssh/config을 편집하고 키 체인에 암호를 기억시키려는 모든 호스트에 UseKeychain yes을 추가하십시오.

예를 들어, 당신은 GitHub의이 작업을 수행하려는 경우 :

Host github.com 
    IdentityFile ~/.ssh/your_github_cert_rsa 
    UseKeychain yes 

당신은 모든 호스트를 사용하려면, 단지 추가 :

Host * 
    UseKeychain yes 

이 새로운 요구 사항입니다, MacOS Sierra 10.12.2에서 Apple에서 추가 한 내용에 대해 자세히 알아볼 수 있습니다. man ssh_config은 10.12.2입니다.

UseKeychain 

      On macOS, specifies whether the system should search for 
      passphrases in the user's keychain when attempting to use a par- 
      ticular key. When the passphrase is provided by the user, this 
      option also specifies whether the passphrase should be stored 
      into the keychain once it has been verified to be correct. The 
      argument must be ``yes'' or ``no''. The default is ``no''.