# Linux Git 記憶帳號密碼設定簡易紀錄 ## 安裝 GitCredentialManager ``` curl -L -O https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.0.935/gcm-linux_amd64.2.0.935.deb sudo apt install ./gcm-linux_amd64.2.0.935.deb ``` ## 設定 git credential 相關 ``` git-credential-manager configure git config --global credential.credentialStore gpg ``` ## 產生 gpg 加密 ```bash sudo apt install pass gpg --gen-key pass init [gpg-id] ``` ## 非 ssh 登入時無法正常使用處理 ``` export GPG_TTY=$(tty) ```