최대 1 분 소요

github에서 git clone 시 permission denied

ssh-keygen \
  -t ed25519 \
  -C "confluent-$(hostname -s)" \
  -f ~/.ssh/id_ed25519_confluent

SSH Agent도 사용하지 않는 방법 macOS Keychain뿐만 아니라 SSH Agent에도 Private Key를 등록하고 싶지 않다면 다음과 같이 설정할 수 있습니다.

vi ~/.ssh/config
Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519_confluent
    IdentitiesOnly yes
    IdentityAgent none
    AddKeysToAgent no
    IgnoreUnknown UseKeychain
    UseKeychain no
~/.ssh/
├── config
├── known_hosts
├── id_ed25519_confluent
└── id_ed25519_confluent.pub

GitHub Public Key 등록

Public Key 확인

cat ~/.ssh/id_ed25519_confluent.pub

Public Key 복사

pbcopy < ~/.ssh/id_ed25519_confluent.pub

GitHub에 등록 profiles > settings > SSH and GPG keys

New SSH key 버튼을 선택합니다. 항목 입력값 Title Confluent - MacBook-01 Key type Authentication Key Key 복사한 Public Key

Add SSH key 버튼을 선택합니다.

Private Key 파일을 직접 사용하여 인증합니다.

ssh -T git@github.com

[결과] Hi jgyun0! You’ve successfully authenticated, but GitHub does not provide shell access.

태그:

카테고리:

업데이트:

댓글남기기