Skip to content

Support for SSH config file #4217

@binkley

Description

@binkley

Describe the feature or problem you’d like to solve

I make frequent use of the ~/.ssh/config file for hostname aliases. This helps me separate my work SSH identity from my personal SSH identity. For example:

🌼 cat /Users/boxley/.ssh/config 
Host personal
    HostName ssh.github.com
    Port 443
    User git
    IdentityFile ~/.ssh/id_rsa

Host work
    HostName ssh.github.com
    Port 443
    User git
    IdentityFile ~/.ssh/id_rsa_work

With this SSH config, my repo looks like this to .git/config:

[remote "origin"]
	url = git@personal:binkley/skratch.git
	fetch = +refs/heads/*:refs/remotes/origin/*

gh does not recognize the correct hostname, wants to reauthenticate, and fails to connect to GitHub.

Proposed solution

SSH support should include support for ~/.ssh/config, particularly host & port settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLImore-info-neededMore info needed from user/contributor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions