Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ssh key saved in ssh-agent if deploy key env var is not set. Fixes #398 #400

Merged
merged 1 commit into from
Oct 14, 2020

Conversation

raquo
Copy link
Contributor

@raquo raquo commented Oct 14, 2020

@olafurpg Thanks for the pointer in #398, I think this should fix it.

  • If neither env variable is found, we now set DEPLOY_KEY to empty string instead of throwing an error.
  • Code proceeds to if [[ -n "${DEPLOY_KEY:-}" ]]; then. This checks that DEPLOY_KEY is set AND non-empty, so this check fails, and the code proceeds into else, where a warning is printed.
  • Code then proceeds to run yarn install etc. If you have ssh-add-ed an ssh key like I do locally, this will use that key, and your name & email (not docusaurus info from set-up-ssh), which... I guess is appropriate given that your personal key is used?

This change works for me, I tested by running this script locally on bash 3.2.

I thought about updating the docs to indicate this new behaviour, but the way they read heavily implies this new behaviour already I think.

Copy link
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Let’s give this a try 💪

@olafurpg olafurpg merged commit 15e8396 into scalameta:master Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants