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

Create .ssh if it does not exist #7062

Merged
merged 1 commit into from
Oct 30, 2017
Merged

Conversation

davidwindell
Copy link
Contributor

@davidwindell davidwindell commented Oct 27, 2017

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.

@davidwindell davidwindell requested a review from tolusha as a code owner October 27, 2017 23:22
@codenvy-ci
Copy link

Can one of the admins verify this patch?

@benoitf benoitf added the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Oct 27, 2017
@codenvy-ci
Copy link

Can one of the admins verify this patch?

Signed-off-by: David Windell <david@outeredgeuk.com>
@davidwindell davidwindell force-pushed the patch-4 branch 2 times, most recently from 1bf0f56 to fd4b657 Compare October 28, 2017 01:27
@davidwindell davidwindell changed the title Create .ssh if it does not exist Create .ssh if it does not exist / fix erroneous characters Oct 28, 2017
@benoitf benoitf added the kind/bug Outline of a bug - must adhere to the bug report template. label Oct 28, 2017
@tolusha tolusha requested review from benoitf and garagatyi October 30, 2017 06:30
@@ -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}
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove ,:
sed -e "s/\"//"

Copy link
Contributor Author

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.

@davidwindell davidwindell changed the title Create .ssh if it does not exist / fix erroneous characters Create .ssh if it does not exist Oct 30, 2017
@riuvshin riuvshin added this to the 5.20.0 milestone Oct 30, 2017
@riuvshin riuvshin merged commit 63302f9 into eclipse-che:master Oct 30, 2017
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants