Skip to content

[Bug]: Some OpenSSH configuration file options cause plugin to fail #976

@andr1an

Description

@andr1an

Describe the bug

In user SSH client config file, when using options that were added into OpenSSH in more recent versions, plugin fails to pull and push with an error "bad configuration options".

Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)

obsidian-git: Pulling....
plugin:obsidian-git:388 obsidian-git: Error: /Users/sandrianov/.ssh/config: line 23: Bad configuration option: warnweakcrypto
/Users/sandrianov/.ssh/config: terminating, 1 bad configuration options
fatal: Could not read from remote repository.

Steps to reproduce

  1. Add WarnWeakCrypto no-pq-kex to the user's OpenSSH configuration file (~/.ssh/config)
  2. Try to pull or push the vault changes

Expected Behavior

Plugin does not fail, at least respects Match version ... syntax.

Addition context

I've tried to make the option only being read by OpenSSH 10.x, but looks like obsidian-git does not support that syntax neither:

# ~/.ssh/config
Match version OpenSSH_10.*
    WarnWeakCrypto no-pq-kex

This would be very useful for the future releases.

Operating system

macOS

Installation Method

None

Plugin version

2.35.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions