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

Prompt users to provide an SSH key pair if using Git with SSH in a devfile #19133

Closed
vitaliy-guliy opened this issue Feb 23, 2021 · 3 comments
Closed
Assignees
Labels
area/plugins kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P2 Has a minor but important impact to the usage or development of the system. sprint/current
Milestone

Comments

@vitaliy-guliy
Copy link
Contributor

Is your task related to a problem? Please describe.

It's possible to clone the project with Git: Clone command.
SSH plugin catches the errors when cloning of git projects and displays a notification with proposal to add key to GitHub.

Screenshot from 2021-02-23 17-34-44

It would be nice, if the SSH plugin will have the same UX as the workspace plugin and will display similar notifications.

Improvements of workspace plugin introduced with eclipse-che/che-theia#995

It would be nice also if the SSH plugin will handle the clone not only from GitHub to be able to configure SSH for any git server.

@vitaliy-guliy vitaliy-guliy added kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system. area/plugins labels Feb 23, 2021
@sunix
Copy link
Contributor

sunix commented Feb 24, 2021

We could somehow, take the control of any ssh calls done by git.
See https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables#_miscellaneous

GIT_SSH, if specified, is a program that is invoked instead of ssh when Git tries to connect to an SSH host. It is invoked like $GIT_SSH [username@]host [-p ] . Note that this isn’t the easiest way to customize how ssh is invoked; it won’t support extra command-line parameters, so you’d have to write a wrapper script and set GIT_SSH to point to it. It’s probably easier just to use the ~/.ssh/config file for that.

So imagine a CLI like https://github.com/che-incubator/chedo configured like export GIT_SSH=chedo ssh. It could wrap the ssh calls and make any git clone of a ssh uri handled the same way, whether it is called from theia or the terminal.

@benoitf benoitf changed the title Cloning by Git Clone command should be consistent with cloning by workpsace plugin Cloning by Git Clone command should be consistent with cloning by workspace plugin Feb 24, 2021
@ericwill ericwill mentioned this issue Feb 25, 2021
46 tasks
@ericwill ericwill added this to the 7.28 milestone Mar 2, 2021
@ericwill ericwill mentioned this issue Mar 18, 2021
46 tasks
@ericwill ericwill modified the milestones: 7.28, 7.29 Mar 24, 2021
@ericwill ericwill modified the milestones: 7.29, 7.30 Apr 14, 2021
@l0rd l0rd changed the title Cloning by Git Clone command should be consistent with cloning by workspace plugin Prompt users to provide an SSH key pair if using Git with SSH in a devfile Apr 27, 2021
@l0rd l0rd added the new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes label Apr 27, 2021
@themr0c
Copy link
Contributor

themr0c commented Jun 2, 2021

Release notes: https://issues.redhat.com/browse/CRW-1820

@X-dark
Copy link

X-dark commented Jul 5, 2021

Is this really doing what it pretends to do?
It seems to me that it is only making the Git: clone commands within Theia behave correctly but has no effect on putting a Git url with ssh protocol within the devfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P2 Has a minor but important impact to the usage or development of the system. sprint/current
Projects
None yet
Development

No branches or pull requests

6 participants