Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guilospanck/how-to-gpg-github
How to create your GPG key, import it and sign your commits.
https://github.com/guilospanck/how-to-gpg-github
gpg signature signed-commits
Last synced: 18 days ago
JSON representation
How to create your GPG key, import it and sign your commits.
- Host: GitHub
- URL: https://github.com/guilospanck/how-to-gpg-github
- Owner: Guilospanck
- Created: 2022-09-28T16:09:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-27T13:17:13.000Z (over 1 year ago)
- Last Synced: 2024-10-31T23:25:33.285Z (2 months ago)
- Topics: gpg, signature, signed-commits
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# how-to-gpg-github
How to create your GPG key, import it and sign your commits.## Generate your GPG keys
You can easily generate your GPG keys using the gpg bundle.
It'll all depend on the type of system you're working on. For MacOS, download [GPG Suite](https://gpgtools.org/) and generate your keys following the steps.
Choose at least 4096 bytes and RSA.After that, run the following command and copy the fingerprint of your public key.
```bash
gpg --list-secret-keys --keyid-format=long
```Then, add it to your `.gitconfig` global:
```bash
git config --global user.signingKey {fingerprint}
```To sign all your commits automatically (and not rely on `-S`):
```bash
git config --global commit.gpgsign true
```## [Add GPG key to your Github account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account)
## Using GPG
- Search for keys from other people:
```bash
gpg --search-keys
```- Get your complete public key:
```bash
gpg --armor --export
```- Get GPG key from another GitHub user:
```bash
curl https://api.github.com/users/Guilospanck/gpg_keys | jq ".[0].raw_key" -r | gpg --import
```- Decrypt file
```bash
gpg --decrypt hello.go.gpg > hello.go
```