Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Add helper for SSH setup #19

Closed
mathiasbynens opened this issue Feb 11, 2016 · 0 comments
Closed

Add helper for SSH setup #19

mathiasbynens opened this issue Feb 11, 2016 · 0 comments

Comments

@mathiasbynens
Copy link
Contributor

Every repo using travis-scripts using deploy keys (as recommended) will include some boilerplate code like this:

# Decrypt the file containing the private key.

openssl aes-256-cbc \
    -K $encrypted_fa862907f31d_key \
    -iv $encrypted_fa862907f31d_iv \
    -in "$(dirname "${BASH_SOURCE}")/${PRIVATE_KEY_FILE_NAME}.enc" \
    -out ~/.ssh/${PRIVATE_KEY_FILE_NAME} -d;

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Enable SSH authentication.

chmod 600 ~/.ssh/${PRIVATE_KEY_FILE_NAME};
echo 'Host github.com' >> ~/.ssh/config;
echo "  IdentityFile ~/.ssh/${PRIVATE_KEY_FILE_NAME}" >> ~/.ssh/config;

Could travis-scripts include a helper utility that performs these tasks? The only variables are the encrypted key file name, and the key and IV variables. That would allow replacing the above with something like:

set-up-ssh --encrypted-key-file "github_deploy_key" \
           --key "$encrypted_fa862907f31d_key" \
           --iv "$encrypted_fa862907f31d_iv"

This would greatly simplify this section in the docs (ref. #20): https://github.com/alrra/travis-scripts/blob/master/doc/github-deploy-keys.md#26-setup-the-ssh-key-for-travis-ci

alrra added a commit that referenced this issue Feb 22, 2016
Change made in preparation for #19.
@alrra alrra closed this as completed in 8dca462 Mar 27, 2016
alrra added a commit to h5bp/html5boilerplate.com that referenced this issue Mar 28, 2016
Remove the code added in order to set up the SSH connection,
and instead, use travis-scripts' helper function `set-up-ssh`.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: alrra/travis-scripts#19
alrra added a commit to h5bp/html5-boilerplate that referenced this issue Mar 28, 2016
Remove the code added in order to set up the SSH connection,
and instead, use travis-scripts' helper function `set-up-ssh`.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: alrra/travis-scripts#19
alrra added a commit to h5bp/html5please that referenced this issue Mar 28, 2016
Remove the code added in order to set up the SSH connection,
and instead, use travis-scripts' helper function `set-up-ssh`.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: alrra/travis-scripts#19
mathiasbynens added a commit to tibiamaps/tibia-map-data that referenced this issue Mar 28, 2016
mathiasbynens added a commit to tibiamaps/tibia-map-data that referenced this issue Mar 28, 2016
mathiasbynens added a commit to tibiamaps/tibia-map-data that referenced this issue Mar 28, 2016
mathiasbynens added a commit to tibiamaps/tibia-map that referenced this issue Mar 28, 2016
mathiasbynens added a commit to jsperf/benchmark.js-wrapper that referenced this issue Mar 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant