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

[local-companion-app] Fix ssh_config generation on Windows #4774

Merged
merged 2 commits into from
Jul 13, 2021

Conversation

csweichel
Copy link
Contributor

fixes #4768

This PR fixes the ssh_config file generation on Windows by introducing a more sensible default to the --ssh-config flag. Instead of hardcoding /tmp it defaults to os.TmpDir() if the GOOS == "windows".

fixes #4759

In addition, this PR introduces fresh SSH keypair generation for each workspace. This way we don't rely on the user having a keypair generated already, and don't spread the user's id_rsa.pub content around. Also, the SSH public key upload is now properly synchronised (before it was just time.Sleep(500 * time.Millisecond)).

How to test

  1. Download the local app build from this branch
  2. Run the local app (e.g. against prod).
  3. SSH'ing into your workspace should work OOTB

@csweichel csweichel requested review from leodido, akosyakov and a team July 12, 2021 15:04
@akosyakov
Copy link
Member

akosyakov commented Jul 13, 2021

@jmcelreavey @extrawurst Could you please give it a try?

# mac
curl -OL https://csweichel-gitpod-local-companion-4768.staging.gitpod-dev.com/static/bin/gitpod-local-companion-darwin
chmod +x ./gitpod-local-companion-darwin
./gitpod-local-companion-darwin --mock-keyring

# linux
# curl -OL https://csweichel-gitpod-local-companion-4768.staging.gitpod-dev.com/static/bin/gitpod-local-companion-linux
chmod +x ./gitpod-local-companion-linux
./gitpod-local-companion-linux --mock-keyring

# windows
# curl -OL https://csweichel-gitpod-local-companion-4768.staging.gitpod-dev.com/static/bin/gitpod-local-companion-windows.exe
./gitpod-local-companion-windows.exe --mock-keyring

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

works well

@csweichel csweichel merged commit dd3d9de into main Jul 13, 2021
@csweichel csweichel deleted the csweichel/gitpod-local-companion-4768 branch July 13, 2021 08:38
@leodido
Copy link
Contributor

leodido commented Jul 13, 2021

Works like a charm! Thank you! 👏

@jmcelreavey
Copy link

Sorry the links above no longer work. How do I go about generating a new .exe file? :)

@akosyakov
Copy link
Member

It should be deployed soon, you also can do following:

@jmcelreavey
Copy link

jmcelreavey commented Jul 13, 2021

It should be deployed soon, you also can do following:

You sir are a true hero, that worked perfectly! Thanks. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitpod Local Companion doesn't write SSH config file on Windows ssh connection: customizing ssh key
4 participants