Skip to content

Commit 171ba82

Browse files
committed
Fix ssh key format
New Docker Hub UI loses newlines in the env var settings. Loss of new lines leads ssh-add to prompt and fail when loading the key. Base64 encode and decode the key to workaround the limitation.
1 parent 357e758 commit 171ba82

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

all-spark-notebook/hooks/post_push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ INDEX_FILE="${GIT_SANDBOX}/Home.md"
1818

1919
# Configure git so it can push back to GitHub.
2020
eval $(ssh-agent -s)
21-
ssh-add <(echo "$DEPLOY_KEY")
21+
ssh-add <(base64 -d <(echo "$DEPLOY_KEY"))
2222
ssh-add -l
2323
git config --global user.email "[email protected]"
2424
git config --global user.name "Jupyter Docker Stacks"

datascience-notebook/hooks/post_push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ INDEX_FILE="${GIT_SANDBOX}/Home.md"
1818

1919
# Configure git so it can push back to GitHub.
2020
eval $(ssh-agent -s)
21-
ssh-add <(echo "$DEPLOY_KEY")
21+
ssh-add <(base64 -d <(echo "$DEPLOY_KEY"))
2222
ssh-add -l
2323
git config --global user.email "[email protected]"
2424
git config --global user.name "Jupyter Docker Stacks"

minimal-notebook/hooks/post_push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ INDEX_FILE="${GIT_SANDBOX}/Home.md"
1818

1919
# Configure git so it can push back to GitHub.
2020
eval $(ssh-agent -s)
21-
ssh-add <(echo "$DEPLOY_KEY")
21+
ssh-add <(base64 -d <(echo "$DEPLOY_KEY"))
2222
ssh-add -l
2323
git config --global user.email "[email protected]"
2424
git config --global user.name "Jupyter Docker Stacks"

pyspark-notebook/hooks/post_push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ INDEX_FILE="${GIT_SANDBOX}/Home.md"
1818

1919
# Configure git so it can push back to GitHub.
2020
eval $(ssh-agent -s)
21-
ssh-add <(echo "$DEPLOY_KEY")
21+
ssh-add <(base64 -d <(echo "$DEPLOY_KEY"))
2222
ssh-add -l
2323
git config --global user.email "[email protected]"
2424
git config --global user.name "Jupyter Docker Stacks"

r-notebook/hooks/post_push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ INDEX_FILE="${GIT_SANDBOX}/Home.md"
1818

1919
# Configure git so it can push back to GitHub.
2020
eval $(ssh-agent -s)
21-
ssh-add <(echo "$DEPLOY_KEY")
21+
ssh-add <(base64 -d <(echo "$DEPLOY_KEY"))
2222
ssh-add -l
2323
git config --global user.email "[email protected]"
2424
git config --global user.name "Jupyter Docker Stacks"

scipy-notebook/hooks/post_push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ INDEX_FILE="${GIT_SANDBOX}/Home.md"
1818

1919
# Configure git so it can push back to GitHub.
2020
eval $(ssh-agent -s)
21-
ssh-add <(echo "$DEPLOY_KEY")
21+
ssh-add <(base64 -d <(echo "$DEPLOY_KEY"))
2222
ssh-add -l
2323
git config --global user.email "[email protected]"
2424
git config --global user.name "Jupyter Docker Stacks"

tensorflow-notebook/hooks/post_push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ INDEX_FILE="${GIT_SANDBOX}/Home.md"
1818

1919
# Configure git so it can push back to GitHub.
2020
eval $(ssh-agent -s)
21-
ssh-add <(echo "$DEPLOY_KEY")
21+
ssh-add <(base64 -d <(echo "$DEPLOY_KEY"))
2222
ssh-add -l
2323
git config --global user.email "[email protected]"
2424
git config --global user.name "Jupyter Docker Stacks"

0 commit comments

Comments
 (0)