Skip to content

Instantly share code, notes, and snippets.

@andersonssantana
Forked from MoisesSantana/gpg-to-ssh.md
Created August 1, 2023 14:28
Show Gist options
  • Save andersonssantana/173bc3b890c45862d69ad1191c1a6654 to your computer and use it in GitHub Desktop.
Save andersonssantana/173bc3b890c45862d69ad1191c1a6654 to your computer and use it in GitHub Desktop.
Usando chave SSH como chave GPG
# Configurando ssh como chave gpg
$ git config --global gpg.format ssh

# Configurando signingKey com a chave ssh
$ git config --global user.signingKey 'suaChaveSSH'

# Configurando para que os commits e tags sejam assinados
$ git config --global commit.gpgsign true
$ git config --global tag.gpgsign true

# Adicionando chave ssh no ssh-agent
$ eval "$(ssh-agent -S)"
$ ssh-add ~/.ssh/suaChave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment