Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh codespace ssh --config references non-existing ssh key #9817

Copy link
Copy link

Description

@liskin
Issue body actions

Describe the bug

gh codespace ssh --config generates a config that assumes the existence of ~/.ssh/codespaces.auto, and thus any subsequent ssh cs.my-space.my-branch invocations fail.

$ gh --version
gh version 2.46.0 (2024-03-26 Debian 2.46.0-1)
https://github.com/cli/cli/releases/tag/v2.46.0

Steps to reproduce the behavior

$ gh codespace ssh --config >>~/.ssh/config
$ ssh -v cs.my-space.my-branch
[…]
error getting ssh server details: failed to read public key file: open /home/tomi/.ssh/codespaces.auto.pub: no such file or directory
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535

Expected vs actual behavior

I expected to be able to connect without getting an error.

This was discussed earlier in #5958 (comment) - but never resolved. It's quite baffling actually - why reference a key file that will never be generated? How can that ever work?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't workinggh-codespacerelating to the gh codespace commandrelating to the gh codespace commandneeds-triageneeds to be reviewedneeds to be reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.