일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 인증서
- SSL
- linux vhost
- timestamp
- 사설인증서
- tortoise
- pem
- srt
- time to date
- dns
- conf
- git
- SSLCertificateFile
- SSLCACertificateFile
- 콘서트급
- CSR
- 호스트설정
- #정규식 #javascript #PHP #자바스크립트 # 문자숫자 #문자만 #숫자만 #문자걸러내기 #숫자걸러내기 #ereg #match #eregi
- unixtimestamp
- SSLCertificateKeyFile
- 앞니쩌러
- BohemianRhapsody
- rootCA
- 감동실화
- vhost
- key
- codecommit
- 공개키
- 개인키
- 가상호스트
- Today
- Total
CosmoPolitan
AWS CodeCommit에 SSH로 연동하기 (Windows / Ubuntu) (feat. git) 본문
AWS CodeCommit에 SSH로 연동하기 (Windows / Ubuntu) (feat. git)
BourgeoisBohemian 2019. 3. 19. 09:461. AWS IMA 사용자 계정에 권한 부여 (AWSCodeCommitFullAccess) 및 CodeCommit 내 Repository 생성
1-1. 사용자 계정 권한 부여
1-2. CodeCommit 내 Repository 생성
2. Ubuntu 서버에서의 연동
2-1. 연동할 서버(Ubuntu)의 계정에 Private Key 발급 (예시로 testserver 계정)
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/drive/Users/user-name/.ssh/id_rsa): /home/testserver/.ssh/codecommit_rsa
Enter passphrase (empty for no passphrase): <press Enter>
Enter same passphrase again: <press Enter>
Your identification has been saved in drive/Users/user-name/.ssh/codecommit_rsa.
Your public key has been saved in drive/Users/user-name/.ssh/codecommit_rsa.pub.
The key fingerprint is:
45:63:d5:99:0e:99:73:50:5e:d4:b3:2d:86:4a:2c:14 user-name@client-name
The key's randomart image is:
+--[ RSA 2048]----+
| E.+.o*.++|
| .o .=.=o.|
| . .. *. +|
| ..o . +..|
| So . . . |
| . |
| |
| |
| |
+-----------------+
2-2. 서버 계정 폴더에 .ssh 폴더 만들고 인증서 복사
testserver 계정이면, /home/testserver/.ssh 폴더 내
codecommit_rsa
codecommit_rsa.pub
파일 복사
2-3. [codecommit_rsa] 파일을 열어 클립보드에 복사(메모장 복사를 추천) 후,
AWS IMA의 [내 보안 자격증명] > [AWS CodeCommit 자격 증명] 탭 > SSH 퍼블릭 키 업로드 클릭하여 복사한 내용 저장
2-4. 퍼블릭 키 업로드 후 생성된 SSH 키 ID를 복사 후,
ubuntu 계정 폴더(/home/testserver/.ssh)에 config (확장자 없이) 아래 내용 입력한 파일 생성 후 저장
Host git-codecommit.*.amazonaws.com
User [복사한 SSH 키 ID]
IdentityFile ~/.ssh/codecommit_rsa
2-5. Git 명령어를 이용해 원하는 폴더 내에서 연동
git clone ssh://[SSH 키 ID]@git-codecommit.ap-northeast-2.amazonaws.com/v1/repos/[AWS CodeCommit의 Repository 명]
3. Windows Client 환경에서의 연동
3-1. PUTTYgen 을 이용한 .ppk 생성
- Save private key를 클릭하여 .ppk 파일 생성
- 키 내용을 복사하여 클립보드(또는 메모장)에 저장
3-2. 클립보드에 복사(메모장 복사를 추천) 후
AWS IMA의 [내 보안 자격증명] > [AWS CodeCommit 자격 증명] 탭 > SSH 퍼블릭 키 업로드 클릭하여 복사한 내용 저장
3-3. 퍼블릭 키 업로드 후 생성된 SSH 키 ID를 복사 후, 아래와 같이 GIT 연동 생성 (Git clone ; 한글 메뉴명 Git 복제하기)
- URL : ssh://[SSH 키 ID]@git-codecommit.ap-northeast-2.amazonaws.com/v1/repos/[AWS CodeCommit의 Repository 명]
* 서울 Region은 ap-northeast-2 입니다.
- 폴더 : Git 연동할 로컬PC의 폴더명
- Putty키 쓰기 : PUTTYgen으로 생성한 privatekey의 파일경로 지정
[참고]
https://www.dev4press.com/blog/tutorials/2017/aws-codecommit-git-with-tortoisegit-using-ssh/
https://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/setting-up-ssh-windows.html
'커리어 개발 영역 > 01_개발 하기' 카테고리의 다른 글
Oracle 에서 UnixTimestamp 형식의 필드를 Date 형태로 변환 쿼리 (0) | 2019.03.19 |
---|---|
SSL 인증서 만들고 conf 설정하고 사설 인증서 PC에 setting하기 (0) | 2019.03.07 |
Linux 기반 OS에서 vHost 설정 방법 (/usr/local/apache/conf) (0) | 2019.03.07 |
[JS] [PHP] 정규식으로 문자 숫자 포함여부 찾기 (0) | 2019.02.21 |
[SQL] Tuning(튜닝) 방법론 (0) | 2019.02.18 |