-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): Add encrypted ssh key for semantic-release (#20)
- Loading branch information
1 parent
6cacbfa
commit a73f672
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
# Decrypt Github Deploy key for the Semantic Release package to be able to push tags | ||
# Ubuntu-14.04 | ||
|
||
# Make sure only the current user can read the private key- | ||
/usr/bin/openssl aes-256-cbc -K "${encrypted_ba12a3340263_key}" -iv "${encrypted_ba12a3340263_iv}" -in git_deploy_key.enc -out /tmp/git_deploy_key -d | ||
# Make sure only the current user can read the private key | ||
/bin/chmod 600 /tmp/git_deploy_key | ||
# Create a script to return the passphrase environment variable to ssh-add | ||
/bin/echo 'echo ${SSH_PASSPHRASE}' > /tmp/askpass && chmod +x /tmp/askpass | ||
# Start the authentication agent | ||
eval "$(ssh-agent -s)" | ||
# Add the key to the authentication agent | ||
DISPLAY=":0.0" SSH_ASKPASS="/tmp/askpass" /usr/bin/setsid ssh-add /tmp/git_deploy_key </dev/null | ||
|
Binary file not shown.