question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow Che 7 Git + SSH Flow

See original GitHub issue

The problem

As mentioned in #12850 git+ssh is currently not working (cloning a project). A user is able to generate an SSH key pair with the ssh plugin (even if currently this plugin doesn’t seems to be included in che-theia) but:

  • cloning may happen at IDE startup (a user won’t be able to generate the keys)
  • git in che-theia doesn’t support SSH
  • ssh keys are only available in che-theia container

The proposed flow

Here is a list of steps/task of a git+ssh flow that I have splitted in 3 priority levels:

🦄critical for the GA: allow SSH key persistence and usage 🐴nice to have for the GA: automate for a better UX and get rid of the SSH plugin 🐮postponed after the GA: leverage GitHub token when available to automate even more

First time user login

  • 🐴Generate SSH keys when the user login for the first time and store them in user preferences #14411
  • 🐮If a GitHub token is available upload the SSH key to GitHub

At workspace creation:

  • 🦄mount the SSH keys as secrets in all workspace containers #13520
  • 🐴setup (or mount?) git config (name and email) #13874

At workspace cloning with git+ssh:

  • 🐴Check if the user can authenticate
  • 🐴If the user cannot be auth but it’s a GitHub URL
    • 🐮If we have his GitHub token: automatically upload the SSH key
    • 🐴If we don’t have his GH token prompt him to upload the key manually
  • 🐴If the user cannot be authenticated and it’s not GitHub prompt the user to do the following steps after the workspace is started 1) generate the key using the addon if that hasn’t been done yet 2) add its SSH public key to the git server 3) clone the project or restart the workspace

Misc

  • 🦄Add git+ssh support in che-theia container #12850
  • 🦄Enable the SSH plugin
  • 🐴Make sure that current Che 7 stacks have git+ssh support
  • 🐴Add git+ssh scenario in e2e happy path tests

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:23 (22 by maintainers)

github_iconTop GitHub Comments

2reactions
vitaliy-guliycommented, Feb 23, 2021

The UX when cloning of Git repositories with SSH uri was improved and merged.

2reactions
l0rdcommented, Jul 18, 2019

We have discussed that the current behavior of the SSH plugin should be changed.

  1. There should be 2 generate commands: SSH: generate key pair... and SSH: generate key pair for particular host...
  2. SSH: generate key pair for particular host... works as the currently implemented in https://github.com/eclipse/che-theia/pull/352/files
  3. SSH: generate key pair... instead would add a key for the generic host
Host *
  IdentityFile <path>
  1. SSH: generate key pair... would send a request the the SSH manager with parameters { "service" : "vcs", "name": "default-<timestamp>"}
  2. When a user call SSH: generate key pair... a second time a new key will be generated and added, the previous keys won’t be deleted.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Use SSH keys to communicate with GitLab
GitLab uses the SSH protocol to securely communicate with Git. When you use SSH keys to authenticate to the GitLab remote server, you...
Read more >
Using Git Repository SSH Keys - AWS OpsWorks
Use a repository SSH key to allow AWS OpsWorks to asynchronously deploy apps or cookbooks from a private Github repository without additional user...
Read more >
Chapter 11. Using version control - Red Hat Customer Portal
Go to Settings > SSH and GPG keys and click the New SSH key button. Enter a title and paste the public key...
Read more >
Tutorial Git and GitHub - 4. GitHub Account and SSH Key - 2020
In GitHub site, Account Setting>SSH keys>Add SSH Key. Paste the key we copied. Then, click "Add key". Account_SSH_Keys.png GitHubHasKey.png.
Read more >
Adding your SSH key to GitLab - Packt Subscription
How to do it… · Open GitLab and go to your account settings. · Click on Add SSH Key. · You should copy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found