-
ssh key 생성
$ cd ~/.ssh $ ssh-keygen -f deploy_rsa $ ls -al -rw-r--r-- 1 user user 4023 11월 8 21:52 authorized_keys -rw------- 1 user user 1675 11월 8 21:43 deploy_rsa -rw-r--r-- 1 user user 408 11월 8 21:43 deploy_rsa.pub -rw-r--r-- 1 user user 4096 11월 8 21:55 known_hosts
-
pull/push 실행할 서버에 ssh key(private) 등록
$ ssh-add ~/.ssh/deploy_rsa @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644 for '/home/user/.ssh/deploy_rsa' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. $ chmod 600 ~/.ssh/deploy_rsa $ ssh-add ~/.ssh/deploy_rsa Identity added: /home/user/.ssh/deploy_rsa (/home/user/.ssh/deploy_rsa)
-
github 계정에 ssh key(public) 등록
$ cat ~/.ssh/deploy_rsa.pub
Settings > SSH and GPG keys > New SSH Key
referneces