순간을 잡아두자 .. RSS 태그 관리 글쓰기 방명록 butteryoon+tistory@gmail.com
전체 글 (862)
2016-06-09 15:59:02

git bash에서 gitlab, bitbucket 의 저장소에 접근하려 하는데 SSH Key를 여러개를 등록했더니 Public Key 퍼미션 오류가 난다. bitbucket의 도움말을 살펴보니 아래와 같이 ~/.ssh/config 파일에 각 저장소의 키를 지정할 수 있단다.

https://confluence.atlassian.com/bitbucket/configure-multiple-ssh-identities-for-gitbash-mac-osx-linux-271943168.html

~/.ssh/config 파일 설정

# Default gitlab user
Host gitlab.com
HostName gitlab.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/personalid
 
# Work user account
Host bitbucket.org
HostName bitbucket.org
PreferredAuthentications publickey
IdentityFile ~/.ssh/workid