Skip to content

Commit

Permalink
docs: update README with homebrew instructions for macos
Browse files Browse the repository at this point in the history
- update `Content-Type` for build.sh
  • Loading branch information
asimpson committed Aug 24, 2021
1 parent b14f857 commit c5e1485
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,26 @@ A CLI for generating [SSH Certificates](https://engineering.fb.com/2016/09/12/se
SSH Certificates are easier to manage than SSH keys primarily because Certificates can expire automatically.
This expiration means access to Sparkbox Slack is required to get SSH access to our various servers which strikes a good balance between security and maintenance overhead.

## How to use
## Installation

### macOS

1. `brew tap sparkbox/brew`
1. `brew install sparkbox/brew/sb`

### Linux

1. Download `sb` from the [latest release](https://github.com/sparkbox/sb/releases) for your architecture.
1. Unzip the file.
1. *On a Mac, you will need to `control + click` the unzipped binary and select "Open" from the menu.*
1. Download `sb` from the [latest release](https://github.com/sparkbox/sb/releases)
1. Unzip the file
1. Move the `sb` binary to a location your `$PATH` understands: e.g. `mv sb /usr/local/bin/sb`
1. Start a fresh shell instance (new Terminal window)


## How to use

1. Login by running `sb login`. This should launch a Sign-in with Slack prompt in your browser. Paste the resultant ID and token back to `sb`.
1. You're now set to generate a SSH Certificate, run `sb ssh`.
1. Verify your local `ssh-agent` has the cert by running `ssh-add -l`and noting the `ECDSA-CERT` entry.
1. Run `sb ssh` to generate a new, time limited SSH certificate.
1. Run `ssh-add -l` to verify your local `ssh-agent` has the cert by locating the `ECDSA-CERT` entry.
1. You can now SSH to any host that is configured to trust the Certificate Authority.

## How it works
Expand Down
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ upload_file() {
if [ "${NAME}" = "amd64-linux-sb" ]; then
zip "${NAME}.zip" "${NAME}"
NAME="${NAME}.zip"
CONTENT_TYPE="Content-Type: application/zip"
else
NAME="${NAME}.dmg"
CONTENT_TYPE="Content-Type: application/octet-stream"
fi

curl -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "Content-Type: application/zip" \
-H "${CONTENT_TYPE}" \
--data-binary "@${NAME}" \
"${UPLOAD_URL}?name=${NAME}"
}
Expand Down

0 comments on commit c5e1485

Please sign in to comment.