Doarchive

cannot exec 'git-remote-': bad cpu type in executable. git: permission denied (publickey)- SSH Key 등록하기 본문

ETC

cannot exec 'git-remote-': bad cpu type in executable. git: permission denied (publickey)- SSH Key 등록하기

오순발닦개 2023. 6. 28. 10:06

1. SSH Key?

 SSH (Secure Shell) 키는 사용자 신원을 인증하는 데 사용되는 암호화 된 디지털 자격 증명입니다. SSH 키는 안전한 네트워크 프로토콜인 SSH를 사용하여 원격 서버와 통신하는 데 사용됩니다.

 

2. SSH Key 생성하기

- 터미널에서 아래 명령어 사용

 % ssh-keygen -t rsa

 

- SSH Key가 자동으로 생성됨.    directory 나 password  설정은  모두 엔터를 눌러 패스 해줬다 

Enter file in which to save the key (/Users/doado/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/doado/.ssh/id_rsa
Your public key has been saved in /Users/doado/.ssh/id_rsa.pub
The key fingerprint is:
*************************** doado@MacBook-Pro.local
The key's randomart image is:
+---[RSA 3072]----+
|++****     ..B   |
|*+BB..o   . O .  |
|*****. . O * .   |
| + .= o + +   .  |
|  BB . ** OOOO   |
| .  .   +.o .    |
|       . B..     |
|      O ..       |
|     BBOO        |
+----[SHA256]-----+

 

 - 아래 명령어로 생성된 SSH Key보기 

% cat ~/.ssh/id_rsa.pub

c

ssh-rsa BBvabbLUdbbbababababbababa++8= doado@MacBook-Pro.local

-  터미널 에서 전채 순서 

 

 

 - Git lab  에서 SSH Key  등록  ssh-rsa 부분부터 다 넣는다. 

 
728x90