-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Create .ssh if it does not exist #7062
Conversation
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Signed-off-by: David Windell <david@outeredgeuk.com>
1bf0f56
to
fd4b657
Compare
@@ -34,7 +36,7 @@ echo 'api_url='"$api_url" >> ${SCRIPT_FILE} | |||
echo 'request="'${request}'"' >> ${SCRIPT_FILE} | |||
# Ssh key request may return key with decoded '=' symbol, so need to replace '\u003d' to '='. | |||
# TODO remove the replacement after https://github.com/eclipse/che/issues/5253 will be fixed. | |||
echo 'ssh_key=$(${request} "$api_url/ssh/vcs/find?name=$host$(if [ -n "$token" ]; then echo "&token=$token"; fi)"| grep -Po '\''"privateKey":.*?[^\\\\]",'\''| sed -e "s/\"privateKey\":\"//" | sed -e "s/\\\\\u003d/=/g")' >> ${SCRIPT_FILE} | |||
echo 'ssh_key=$(${request} "$api_url/ssh/vcs/find?name=$host$(if [ -n "$token" ]; then echo "&token=$token"; fi)"| grep -Po '\''"privateKey":.*?[^\\\\]",'\''| sed -e "s/\"privateKey\":\"//" | sed -e "s/\",//" | sed -e "s/\\\\\u003d/=/g")' >> ${SCRIPT_FILE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ,
:
sed -e "s/\"//"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tolusha I couldn't reproduce the error we were having last week anymore so I've just made the PR fix the missing ssh dir for now.
The git credentials agent will fail if the base image used doesn't already have an
.ssh
folder for the user. This PR will create one if it doesn't exist.