gosaaan1 / hokulea-garage

AWS とTerraform を学ぶための箱庭
Apache License 2.0
1 stars 0 forks source link

terraform-mfaの `gpg --gen-key` がVSCode1.75以降で動かない #3

Closed gosaaan1 closed 1 year ago

gosaaan1 commented 1 year ago
Change (N)ame, (E)mail, or (O)kay/(Q)uit? O
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: WARNING: server 'gpg-agent' is older than us (2.2.19 < 2.2.20)
gpg: Note: Outdated servers may lack important security fixes.
gpg: Note: Use the command "gpgconf --kill all" to restart them.
gpg: agent_genkey failed: Forbidden
Key generation failed: Forbidden
gosaaan1 commented 1 year ago
gosaaan1 commented 1 year ago

…煮詰まってきたので、いったん現状整理。

gosaaan1 commented 1 year ago

確認した挙動

gosaaan1 commented 1 year ago

★必要なプロセスが落ちてないか?

gpg が必要とするプロセス

影響していそうなもの

  1. VSCode Remote Containers で --privileged と /sbin/init を渡したコンテナで開発する方法
gosaaan1 commented 1 year ago

https://github.com/gosaaan1/hokulea-garage/issues/3#issuecomment-1465057782 このチェックを外すとソケットバインドされなくなるが、現象は変わらず。 スクリーンショット 2023-04-15 091407 Dev Containers拡張機能>チュートリアル

gosaaan1 commented 1 year ago

回避方法が見つかったので、メモ。

{
    "image": "terraform-mfa:22.202303",
    "postCreateCommand": "rm ~/.gnupg/S.gpg-agent* && gpg-connect-agent reloadagent /bye",
    "extensions": [
        "eamodio.gitlens",
        "hashicorp.terraform"
    ]
}