Project2021

[git]Enter passphase for ... /.ssh/id_rsa

뱅타 2021. 6. 11. 22:32

git clone을 따로 안해본지 오래되었습니다.

이번 프로젝트에 화상채팅 및 실시간 채팅을 websocket 말고 webRtc를 사용해 보기로 했습니다.

그래서 관련 정보를 검색하는 도중 예제 파일이 github에 올려져 있어서

오랜만에 local에 git clone을 하게 되었습니다.

그런데 이게 웬걸?

이렇게 github에 등록한 .ssh에 대한 passphrase를 입력하라고 나왔습니다.

예전에 등록했던 것이라 passphrase가 기억이 나질 않더군요.

그래서 관련된 자료를 검색해 보았습니다.

github 공식 사이트로 해당 정보들이 적어져 있습니다.(OS에 따라 찾는 방법 역시 잘 설명되어 있습니다.)

https://docs.github.com/en/github/authenticating-to-github/troubleshooting-ssh/recovering-your-ssh-key-passphrase

저는 Mac을 사용하기에 Mac에서 ssh passphase를 찾는 방법에 대해 작성해 보겠습니다.

  1. key chain 을 엽니다.
  1. 왼쪽 하단의 All items에서 오른쪽 상단의 검색창에 SSH를 입력합니다.

그러면 이렇게 검색되는 것을 알 수 있습니다. 더블클릭하게되면

이렇게 정보가 뜹니다.

하단의 Show password를 클릭하면 사용자의 비밀번호(mac 시작 시 비밀번호)를 입력하면 보여집니다.

그리고 ssh-add로 등록해 주면 됩니다.

ssh-add는 이런 역할을 합니다.

💡
ssh-add adds private key identities (from your ~/.ssh directory) to the authentication agent (ssh-agent), so that the ssh agent can take care of the authentication for you, and you don’t have type in passwords at the terminal.

https://superuser.com/questions/360686/what-exactly-does-ssh-add-do

728x90
반응형