GitHub의 Deploy Key에서 여러 자료 저장소에 연결하는 방법
Key is already in use
다른 열쇠는 등록할 수 없지만
Jenkins 또는 여러 개인 저장소에 액세스하려는 경우
sshconfig를 통해 연결 주소를 변경하여 처리합니다.
예를 들어,
repository-second 저장소라고 하는 경우키 만들기
$ ssh-keygen -f ~/.ssh/repository-second
ssh config에 추가
config가 없으면 파일을 만듭니다.
$ touch ~/.ssh/config
$ chmod 600 ~/.ssh/config
$ vim ~/.ssh/config
Host github-repository-first
  User git
  Port 22
  HostName github.com
  IdentityFile ~/.ssh/repository-first
  TCPKeepAlive yes
  IdentitiesOnly yes
Host github-repository-second
  User git
  Port 22
  HostName github.com
  IdentityFile ~/.ssh/repository-second
  TCPKeepAlive yes
  IdentitiesOnly yes
Github의 Deploy Keys에 공개 키 등록
$ cat ~/.ssh/repository-second.pub
 
 GitHub 액세스
대상 호스트 이름을 config에서 지정한 호스트 이름으로 변경합니다.
[email protected]:narikei/repository-second.git↓git@github-repository-second:narikei/repository-second.git지금$ git clone git@github-repository-second:narikei/repository-second.git
Reference
이 문제에 관하여(GitHub의 Deploy Key에서 여러 자료 저장소에 연결하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/narikei/items/fe05e27a58aa35fa8752텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)