-
Github Desktop: verified commit 만들기컴퓨터/소프트웨어 2020. 12. 16. 08:52728x90반응형
Windows 10 기준
1. Git bash를 열어서 gpg 키가 있는지 확인한다.
gpg --list-secret-keys --keyid-format LONG
git bash in Windows Terminal 위와 같이 목록이 안 나오면, 아래 명령어로 gpg 값을 생성한다.
gpg --full-generate-key
Github 이름, 메일을 적고 대충 넘긴다.
2. export
맨 위 명령어 실행 후, 이메일 뒤에 나와있는 부분을 복사한다.
이 글에선, sec rsa2048/복사할 부분, 2020-12-09
gpg --armor --export 418CD...
----BEGIN ~~~ END ---, BEGIN 문자를 포함하며 전부다 복사한다.
Ubuntu keyserver에 업로드 하기
gpg --keyserver keyserver.ubuntu.com --send-keys yourkeyID
Github 새로운 GPG 키 등록하기 @링크
GitHub: Where the world builds software
GitHub is where over 56 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat...
github.com
BEGIN - END를 복사한 걸 넣는다. 3. Git 설정
Git Bash로 돌아와서 아래 명령어들을 입력한다.
git config --global user.signingkey 418CD...
자동으로 sign하기
git config --global commit.gpgsign true
유저 설정
git config --global user.name "Github이름" git config --global user.email "Github메일"
Windows Github Desktop에서 자동으로 sign 하기
where gpg
gpg가 어디 있는지 확인한다.
위 경로를 아래 명령어에 넣는다.
git config --global gpg.program "/c/Program Files/Git/usr/bin/gpg.exe"
결과
commit 하려고 하면, gpg 키를 생성할 때 만든 passphrase를 입력 후 commit을 해야 한다.
Github commits were verified 참고
How to Setup Verified Commits on Github @Gist 링크
728x90'컴퓨터 > 소프트웨어' 카테고리의 다른 글
Docker: 윈도우에서 ssh 연결로 간단한 Docker VM 만들기 (0) 2021.03.28 winstall - Windows Package Manager (0) 2020.10.04 Windows Terminal 테마, 설정 (0) 2020.08.02