gpg - deptno/deptno.github.io GitHub Wiki

gpg

생성

password λ“±λ‘μ‹œμ—λŠ” GPG_TTY=$(tty) κ°€ ν•„μš”, 외에도 tmux 와 λ‹€μ†Œ 좩돌이 μžˆμ–΄μ„œ μ‚¬μš©ν•˜μ§€ μ•ŠκΈ°λ‘œ 함

gpg --full-generate-key # RSA(0)
gpg --list-secret-keys
gpg --armor --export SECRET_KEY_ID_XXXXXXXXXXXXXXXXXXXXXXXXXX | pbcopy # github 등둝

κ°±μ‹ 

gpg key ν‚€κ°€ λ§Œλ£Œλ˜μ–΄ μ—λŸ¬κ°€ λ‚œλ‹€

gcam "feat: add helm chart traefik 20.8.0" --verbose
error: gpg failed to sign the data
fatal: failed to write commit object

ν‚€λ₯Ό κ°±μ‹ ν•œλ‹€. github μ—μ„œλŠ” 이미 λ“±λ‘λ˜μ–΄μžˆλŠ” ν‚€ κ·ΈλŒ€λ‘œ μ‚¬μš©μ΄ κ°€λŠ₯ν•˜λ‹€.

$ gpg --list-secret-keys

/Users/deptno/.gnupg/pubring.kbx
--------------------------------
sec   rsa4096 2022-01-04 [SC] [expired: 2023-01-04]
      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
uid           [ expired] 이봉 <[email protected]>

sec   ed25519 2022-03-01 [SC]
      BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
uid           [ultimate] 이봉 (mbp14) <[email protected]>
ssb   cv25519 2022-03-01 [E]

$ gpg    ok  16.15.0 node  11:00:37
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
gpg: Go ahead and type your message ...
^C
gpg: signal Interrupt caught ... exiting

$ gpg --edit-key gpg
$ gpg --list-keys
/Users/deptno/.gnupg/pubring.kbx
--------------------------------
pub   rsa4096 2022-01-04 [SC] [expired: 2023-01-04]
      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
uid           [ expired] 이봉 <[email protected]>

pub   ed25519 2022-03-01 [SC]
      BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
uid           [ultimate] 이봉 (mbp14) <[email protected]>
sub   cv25519 2022-03-01 [E]

$ gpg --edit-key AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
gpg (GnuPG) 2.3.8; Copyright (C) 2021 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

sec  rsa4096/A20921D2906CB572
     created: 2022-01-04  expired: 2023-01-04  usage: SC
     trust: ultimate      validity: expired
ssb  rsa4096/2F36802B8CE1A693
     created: 2022-01-04  expired: 2023-01-04  usage: E
[ expired] (1). 이봉 <[email protected]>

gpg> expire
Changing expiration time for the primary key.
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 1y
Key expires at 일  1/14 11:03:12 2024 KST
Is this correct? (y/N) y

sec  rsa4096/A20921D2906CB572
     created: 2022-01-04  expires: 2024-01-14  usage: SC
     trust: ultimate      validity: ultimate
ssb  rsa4096/2F36802B8CE1A693
     created: 2022-01-04  expired: 2023-01-04  usage: E
[ultimate] (1). 이봉 <[email protected]>

gpg: WARNING: Your encryption subkey expires soon.
gpg: You may want to change its expiration date too.
gpg> key 1

sec  rsa4096/A20921D2906CB572
     created: 2022-01-04  expires: 2024-01-14  usage: SC
     trust: ultimate      validity: ultimate
ssb* rsa4096/2F36802B8CE1A693
     created: 2022-01-04  expired: 2023-01-04  usage: E
[ultimate] (1). 이봉 <[email protected]>

gpg> expire
Changing expiration time for a subkey.
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 1y
Key expires at 일  1/14 11:05:48 2024 KST
Is this correct? (y/N) y

sec  rsa4096/A20921D2906CB572
     created: 2022-01-04  expires: 2024-01-14  usage: SC
     trust: ultimate      validity: ultimate
ssb* rsa4096/2F36802B8CE1A693
     created: 2022-01-04  expires: 2024-01-14  usage: E
[ultimate] (1). 이봉 <[email protected]>

gpg> save

$ gcam "feat: add helm chart traefik 20.8.0"
[master (root-commit) dee4a99] feat: add helm chart traefik 20.8.0
 46 files changed, 10882 insertions(+)
 create mode 100644 traefik/.helmignore

key 1 도 μ„ νƒν•΄μ„œ subkey 도 ν•¨κ»˜ κ°±μ‹ ν•΄μ£Όλ„λ‘ν•œλ‹€. μ΄ν›„μ—λŠ” 컀밋이 λœλ‹€.

link