Allow Che 7 Git + SSH Flow
See original GitHub issueThe 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:
- Created 4 years ago
- Reactions:1
- Comments:23 (22 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The UX when cloning of Git repositories with SSH uri was improved and merged.
We have discussed that the current behavior of the SSH plugin should be changed.
SSH: generate key pair...
andSSH: generate key pair for particular host...
SSH: generate key pair for particular host...
works as the currently implemented in https://github.com/eclipse/che-theia/pull/352/filesSSH: generate key pair...
instead would add a key for the generic hostSSH: generate key pair...
would send a request the the SSH manager with parameters{ "service" : "vcs", "name": "default-<timestamp>"}
SSH: generate key pair...
a second time a new key will be generated and added, the previous keys won’t be deleted.