-
Window OS에서 Git Secret 사용하기 3개발 2020. 6. 9. 19:22
파일 복호화 하기
git-secret을 적용했던 reposity를 클론해보겠습니다.
왼쪽 : 파일에 git-secret을 적용시킨 후 commit, push한 디렉토리 / 오른쪽 : git-secret을 적용시킨 파일을 clone한 디렉토리 왼쪽이미지의 디렉토리는 파일에 git-secret을 적용시킨 후 commit/push했던 local repository입니다.
오른쪽 이미지의 디렉토리는 remote repository로부터 git-secret을 적용시킨 파일을 clone한 local repository입니다.
왼쪽 디렉토리에는 기존파일/암호화시킨파일이 모두 존재하나, 오른쪽 디렉토리에는 당연히 암호화된 파일만 존재합니다.
따라서 test.txt 파일을 확인하기 위해서는 복호화 과정이 필요합니다.
복호화 과정은 간단합니다.
우선 클론된 Local Repository로 이동합니다.
$ cd /mnt/c/Yujin/cloneGitSecret
다음 명령어를 입력하면 패스워드를 입력받습니다.
패스워드 입력 후, 복호화를 진행합니다.
$ git-secret reveal Enter passphrase:
복호화에 성공하면 다음과 같은 결과를 확인하실 수 있습니다.
git-secret: done. 1 of 1 files are revealed.
기존에는 존재하지 않았던 test.txt파일을 확인하실 수 있습니다.
출처
https://hyunto.github.io/2018/12/11/git-secret/
git-secret
비밀번호, Secret Key 값과 같이 보호되야 하는 데이터가 포함된 파일을 그냥 Git Commit & Push 하면 개인적인 데이터가 노출되는 문제점이 발생합니다. git-secret 을 사용하면 개인적인 데이터가 포함된
hyunto.github.io
https://git-secret.io/git-secret-init
git-secret-init
git-secret-init - initializes git-secret repository.
git-secret.io
https://git-secret.io/git-secret-add
git-secret-add
git-secret-add - starts to track added files.
git-secret.io
https://git-secret.io/git-secret-hide
git-secret-hide
git-secret-hide - encrypts all added files with the inner keyring.
git-secret.io
https://git-secret.io/git-secret-reveal
git-secret-reveal
git-secret-reveal - decrypts all added files.
git-secret.io
'개발' 카테고리의 다른 글
Window OS에서 Git Secret 사용하기 2 (0) 2020.06.09 Windows 10에서 Ubuntu 사용하기 (0) 2020.05.25