์ ๊ทผ (์์ฝ)
์ด์ ๊ธ์์ ํ๋ก์ ํธ ๋ฐฐํฌ + Tag ์์ฑ + Release ์์ ์ ์ํํ๋๋ฐ, GPG Keys ๊ฐ ์์ด์ Tags ํญ์ 'verified'๋ฅผ ๋ฐ์ง ๋ชปํ ๊ฒ์ ํด์ํ๊ณ ์ ํ๋ค. ๋ฐ๋ผ์ GPG Keys๋ฅผ ์์ฑํ๊ณ Github repo์ ์ ์์ ์ผ๋ก ๋ฑ๋กํ๋ ์ ์ฐจ๋ฅผ ๊ธฐ๋กํ๋ค.
1. GPG Key ์์ฑ (1) gnupg ํจํค์ง ์ค์น
- (mac) ~$ brew install gnupg
2. GPG Key ์์ฑ (2) Key ์์ฑํ๊ธฐ
- ~$ gpg --full-generate-key
- (1) what kind of key you want(ํค ์ข ๋ฅ) (2) keysize(ํค ๊ธธ์ด)
- (3) specify how long(์ ํจ๊ธฐ๊ฐ) (4) name / email / comment (๊ฐ์ธ์ ์)
- ์์ฑ ์ดํ, fingerprint / key Id (ํ์ธ๋ฒ)
3. Github repo ๋ฑ๋กํด์ฃผ๊ธฐ
- ์น ๊ฒฝ๋ก ์ด๋
- ๋ฃ์ด์ค์ผํ๋ ๊ฐ ์ถ๋ ฅ : gpg --armor --export [fingerprint]
4. Git ์ค์ (์ด์ ๋ถํฐ '- S' ์๋ช ์ต์ ์ฌ์ฉ ๊ฐ๋ฅ => ๋๋ฌธ์)
- ~$ git config --global user.signingkey [fingerprint]
- ~$ git commit -S -m "Signed Commit!!"
- (ํญ์ ์๋ช ์ค์ ) ~$ git config --global commit.gpgsign true
๋ฐฉ๋ฒ
1. GPG Key ์์ฑ (1) gnupg ํจํค์ง ์ค์น
(mac) ~$ brew install gnupg
## gnupg ํจํค์ง ์ค์น
~$ brew install gnupg
2. GPG Key ์์ฑ (2) Key ์์ฑํ๊ธฐ
- ~$ gpg --full-generate-key
- (1) what kind of key you want(ํค ์ข ๋ฅ) (2) keysize(ํค ๊ธธ์ด)
- (3) specify how long(์ ํจ๊ธฐ๊ฐ) (4) name / email / comment (๊ฐ์ธ์ ์)
- ์์ฑ ์ดํ, fingerprint / key Id (ํ์ธ๋ฒ)
< ์์ฑ ์ดํ >
(1) fingerprint ์ถ๋ ฅํด๋ณด๊ธฐ
## fingerprint ์ถ๋ ฅ
~$ gpg --fingerprint
(2) Key ์กฐํ & Key Id ์กฐํ
~$ gpg --list-secret-keys --keyid-format LONG
(3) PGP PUBLIC KEY BLOCK ์ถ์ถ → github ์ ๋ฑ๋กํด์ค์ผํ๋ Input ๊ฐ
~$ gpg --armor --export [fingerprint]
3. Github repo ๋ฑ๋กํด์ฃผ๊ธฐ
- ์น ๊ฒฝ๋ก ์ด๋ :
4. Git ์ค์ (์ด์ ๋ถํฐ '- S' ์๋ช ์ต์ ์ฌ์ฉ ๊ฐ๋ฅ => ๋๋ฌธ์)
- ~$ git config --global user.signingkey [fingerprint]
- ~$ git commit -S -m "Signed Commit!!"
- (ํญ์ ์๋ช ์ค์ ) ~$ git config --global commit.gpgsign true
(1) Commit์ ์๋ช ์ ํ๊ธฐ ์ํด์๋ .gitconfig์ ์๋ช ์ ๋ณด๋ฅผ ๋ฃ์ด์ผํจ. (์ง์ ์์ X)
~$ git config --global user.signingkey [fingerprint]
(2) ์ดํ๋ถํฐ, '-S (๋๋ฌธ์)' ์ต์ ์ ์ฌ์ฉํด ์๋ช ํ ์ ์๋ค.
~$ git commit -S -m "Signed Commit!!"
(3) Always ์๋ช ๋๋๋ก ์ค์
~$ git config --global commit.gpgsign true
'๐ป DEV > GitHub' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Github] Releases Tags ์์ฑ & Verified ์ธ์ฆ (0) | 2025.05.13 |
---|---|
[Github Actions] ํ๋ก์ ํธ์ github Actions ์ ์ฉ (0) | 2025.03.10 |
[Github] ํ๋ก์ ํธ ์์ฑ (๋ก์ปฌ ์ ์ฅ์์์ ์๊ฒฉ ์ ์ฅ์ Push) (0) | 2025.03.10 |
[ssh-key] ๋ค์ค ๋ฑ๋ก์ผ๋ก ์ธํ ์ธ์ ์ค๋ฅ ํด๊ฒฐ (0) | 2025.03.07 |
[Github - git flow]Git Flow ์ ๋ต - squash merge (0) | 2024.08.06 |
๋๊ธ