diff --git a/assets/img/local-env/gpg-1.png b/assets/img/local-env/gpg-1.png new file mode 100644 index 0000000..473fb8c Binary files /dev/null and b/assets/img/local-env/gpg-1.png differ diff --git a/assets/img/local-env/gpg-2.png b/assets/img/local-env/gpg-2.png new file mode 100644 index 0000000..32177b1 Binary files /dev/null and b/assets/img/local-env/gpg-2.png differ diff --git a/assets/img/local-env/gpg-3.png b/assets/img/local-env/gpg-3.png new file mode 100644 index 0000000..d263a01 Binary files /dev/null and b/assets/img/local-env/gpg-3.png differ diff --git a/assets/img/local-env/gpg-4.png b/assets/img/local-env/gpg-4.png new file mode 100644 index 0000000..2a6658d Binary files /dev/null and b/assets/img/local-env/gpg-4.png differ diff --git a/assets/img/local-env/gpg-5.png b/assets/img/local-env/gpg-5.png new file mode 100644 index 0000000..bb20649 Binary files /dev/null and b/assets/img/local-env/gpg-5.png differ diff --git a/docs/local-env/gpg_signature.md b/docs/local-env/gpg_signature.md new file mode 100644 index 0000000..88a618e --- /dev/null +++ b/docs/local-env/gpg_signature.md @@ -0,0 +1,112 @@ +--- +title: GPG Signature +layout: default +parent: Local Environment +nav_order: 2 +--- + +# GPG Signature + +This documentation is to help you be able to have signed commits when pushing to a repository. Signed commits allow others know that +the commit comes from a reputable source. + +--------- + +## Table of contents +{: .no_toc .text-delta } + +1. TOC +{:toc} + +# MacOS + +This will go through the steps starting from base system operations. If you already have some of these tools you can reference the +[offical documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key). + +1. **Check if you have homebrew installed** + + You can do so by running the following command `brew help` in your terminal. If you get a *command not found* then you don't have it installed. + To install homebrew run the following command in your terminal: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` + +2. **Check if you have GPG installed** + + To check if you have gpg installed run the following command `gpg --help` in your terminal. If you get a *command not found* then you don't have it installed. + To install gpg run the following command in your terminal: `brew install gnupg` + +3. **Generate a GPG key** + + To generate a GPG key you will run the following command: `gpg --full-generate-key` + + You will get several options from here, just press `enter` and fill in the portions you need to fill in. At the end type in `O` and hit `enter`. + Now you have generated your gpg key. + + *NOTE that the email you use must be the email attached to your github account* + + ![GPG Commands]({{ site.baseurl }}/assets/img/local-env/gpg-1.png) + +4. **Extract your GPG key** + + To extract your gpg key run this command: `gpg --list-secret-keys --keyid-format=long` + You should get an output that looks like this: + ``` + $ gpg --list-secret-keys --keyid-format=long + /Users/hubot/.gnupg/secring.gpg + ------------------------------------ + sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10] + uid Hubot + ssb 4096R/4BB6D45482678BE3 2016-03-10 + ``` + Now look at the `sec` portion and extract the string after the `/`. + + Then run the following command: `gpg --armor --export `. If you follow the example it will look like: + `gpg --armor --export 3AA5C34371567BD2`. + + That command should output your gpg key. Copy that key. + +5. **Add your gpg key to your Github Account** + 1. **Navigate to [github](https://github.com/)** + + 2. **Go to your profile settings.** + + ![Github Settings]({{ site.baseurl }}/assets/img/local-env/gpg-2.png) + + 3. **Go to SSH and GPG keys** + + ![SSH and GPG Keys]({{ site.baseurl }}/assets/img/local-env/gpg-3.png) + + 4. **Click `New GPG Key`** + + ![New GPG Key]({{ site.baseurl }}/assets/img/local-env/gpg-4.png) + + 5. **Add a title and copy over your GPG Key** + + ![Add GPG Key]({{ site.baseurl }}/assets/img/local-env/gpg-5.png) + + 6 **Click Add GPG key** + +7. **Configure your git config** + + We now need to configure your git config to be able to sign your commits. + + 1. **Add your signing key** + + You need to add your signing key to your git config. First you need to retrieve your key again. + Extract your gpg key again by running the command:\ + `gpg --list-secret-keys --keyid-format=long`\ + and extract the string after `/` from the `sec` portion of the output. + + After extracting it run the following command:\ + `gpg --list-secret-keys --keyid-format=long ` + + 2. **Make sure you sign commits by default** + + To sign your commits by default run the following command:\ + `git config commit.gpgsign true` + +8. **Adding it to your shell** + + By now you should technically be able to sign all of the commits you make. However if you run into any errors. + run the following command:\ + `echo 'export GPG_TTY=$(tty)' >> ~/.zshrc` + + Restart your terminal to activate the changes and now you should be able to sign your commits! \ No newline at end of file diff --git a/docs/local-env/mac-os.md b/docs/local-env/jekyll.md similarity index 89% rename from docs/local-env/mac-os.md rename to docs/local-env/jekyll.md index f3befec..04c93a0 100644 --- a/docs/local-env/mac-os.md +++ b/docs/local-env/jekyll.md @@ -1,10 +1,24 @@ --- -title: MacOS +title: Jekyll layout: default parent: Local Environment nav_order: 1 --- +# Jekyll + +This documentation is to help you setup jekyll on your local machine and download the right rubygems and ruby. + +------- + +## Table of contents +{: .no_toc .text-delta } + +1. TOC +{:toc} + +# MacOS + This is the documentation for setting up Jekyll on your local Mac environment. First you need to setup "rbenv." ## Rbenv diff --git a/docs/local-env/local-env.md b/docs/local-env/local-env.md index 1e556ab..f71ef6f 100644 --- a/docs/local-env/local-env.md +++ b/docs/local-env/local-env.md @@ -5,4 +5,4 @@ permalink: /docs/local-env has_children: true --- -This documentation is to help those setup your local environment to properly run jekyll. \ No newline at end of file +This documentation is to help those setup your local environment. \ No newline at end of file diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..06069d1 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +export GPG_TTY=/dev/ttys000