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.

SSH keys are available to all containers only after workspace reboot

See original GitHub issue

Describe the bug

After using the >SSH generate key-pair command, the keypair is generated in the theia-ide container only, not accessible for the other running containers.

By default the terminal can be only opened for the deployment container.

It can be circumvented by showing the tool containers or running a new terminal from My Workspace->Plugins->theia-ide

However, after the reboot the key is available in /etc/ssh and the checkout works from all containers.

I would suggest instead of storing the key into /home/theia/.ssh to store it straight into /etc/ssh and restarting the sshd daemon @vparfonov

Che version

  • latest
  • nightly
  • other: please specify (hosted che @ che.prod-preview.OSIO) 7.0.0-rc-4.0 image

Expected behavior

The git clone should be possible from any container right after the key has been generated and added into your git service of choice

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift (include output of oc version)
  • minikube (include output of minikube version and kubectl version)
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • other: (please specify)

OpenShift Master: v3.11.82 Kubernetes Master: v1.11.0+d4cacc0 OpenShift Web Console: v3.11.82

Installation method

  • chectl
  • che-operator
  • minishift-addon
  • I don’t know

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • other: please specify

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
vinokurigcommented, Aug 9, 2019

@sunix

@vparfonov @vinokurig @l0rd why don’t we write to it : we mount it we can have write access.

wright access will not solve the problem, It doesn’t matter where the keys are located after generation, in /etc/ssh or in ~/.ssh. The problem is that the key file is generated only for theia-ide container.

1reaction
vinokurigcommented, Jul 31, 2019

It is not possible to store keys in the /etc/ssh after generating a key, there is no wright access.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using SSH keys inside docker container - Stack Overflow
The solution I found is to add your keys using the --build-arg flag. ... 1.13) to merge the layers so that the keys...
Read more >
Using SSH keys with GitLab CI/CD
SSH keys when using the Docker executor · You first must create an SSH key pair. · Create a new CI/CD variable. ·...
Read more >
Troubleshooting SSH errors - Compute Engine - Google Cloud
Resolve SSH connections by performing the remediation steps provided by the tool. Try reconnecting to the VM. Common SSH errors. The following are...
Read more >
Remote Development Tips and Tricks - Visual Studio Code
Just follow these steps: Generate a separate SSH key in a different file. macOS / Linux: Run the following command in a local...
Read more >
Dockerfile reference - Docker Documentation
This feature is only available when using the BuildKit backend, ... This mount type allows the build container to access SSH keys via...
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