Skip to content

Use standard github.com SSH instead of custom SSH hostname #65

Closed

Description

@neuromechanist

Problem

The upload command uses a custom SSH hostname pattern (nemar-{username}-github) that requires users to manually configure ~/.ssh/config. This was originally designed to support multi-account GitHub scenarios, but:

  1. Multi-account support is no longer being pursued
  2. The custom SSH hostname consistently fails because users don't have it configured
  3. The HTTPS fallback always kicks in, adding unnecessary latency and confusing error messages

From issue #64, the user sees:

SSH test failed for nemar-arnodelorme-github: {
  stderr: "ssh: Could not resolve hostname nemar-arnodelorme-github: nodename nor servname provided, or not known"
}
Custom SSH host nemar-arnodelorme-github not working...
Falling back to HTTPS authentication with gh CLI token...

Current Behavior

Priority order in configureGitHubRemote():

  1. CI token (environment variable)
  2. Custom SSH host (nemar-{username}-github) - almost always fails
  3. HTTPS with gh CLI token - what actually gets used

Proposed Fix

Since multi-account is dropped, simplify to:

  1. CI token (environment variable)
  2. Standard SSH ([email protected]:) - test with ssh -T [email protected]
  3. HTTPS with gh CLI token as fallback

This removes the need for custom ~/.ssh/config entries and eliminates the confusing error messages. Users with standard GitHub SSH keys will just work.

Related

  • Partially visible in Still fails on larger dataset #64 (SSH failure message in upload output)
  • Custom SSH functions to remove: checkNemarGitHubSshConfig(), getNemarSshConfigInstructions(), testCustomSshHost() (in src/lib/git-annex.ts)
  • Remote config logic in configureGitHubRemote() around line 842

Activity

  1. added a commit that references this issue on Jan 22, 2026
    99b5e0e
  2. neuromechanist commented on Jan 23, 2026

    @neuromechanist
    ContributorAuthor

    Upgrade Instructions (v0.3.7+)

    The custom SSH hostname (nemar-{username}-github) is no longer used. Users who previously configured it can clean up:

    1. Remove the old SSH config entry

    Edit ~/.ssh/config and remove the NEMAR-specific block:

    # DELETE this block:
    Host nemar-{your-username}-github
      HostName github.com
      User git
      IdentityFile ~/.ssh/id_rsa
      IdentitiesOnly yes
    

    2. Ensure standard GitHub access works

    The CLI now uses standard [email protected] SSH, with automatic HTTPS fallback via gh CLI. Verify one of these works:

    # Option A: Standard SSH (preferred)
    ssh -T [email protected]
    # Should show: "Hi {username}! You've successfully authenticated..."
    
    # Option B: gh CLI (automatic fallback)
    gh auth status
    # Should show: "Logged in to github.com"

    3. Update the CLI

    bun install -g nemar-cli@latest
    nemar --version  # Should show 0.3.7+

    No other action needed. The CLI will automatically use whichever auth method is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions