oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

Rugged::NetworkError: unsupported URL protocol using scp-like URL with custom SSH port

Open JonasIBK opened this issue 10 months ago • 4 comments

I'm experiencing an error when Oxidized attempts to push configuration changes to my remote Git repository via the hook. Despite using an scp-like URL and configuring a custom SSH port in my SSH config file, the push fails with the following error:

Hook push_to_remote (#<GithubRepo:0x00007f80d449de30>) failed (#<Rugged::NetworkError: unsupported URL protocol>) for event :post_store

Steps to Reproduce:

  1. Oxidized Hook Configuration (excerpt from ~/.config/oxidized/config):
    hooks:
      push_to_remote:
        type: githubrepo
        events: [post_store]
        remote_repo: "[email protected]:user/Oxidized-configs.git"
        publickey: "/root/.ssh/id_rsa.pub"
        privatekey: "/root/.ssh/id_rsa"
    
  2. SSH Client Configuration (in ~/.ssh/config):
    Host server.domain.local
        Port 2222
    
  3. Manual Test:
    Executing the following command works as expected:
    git ls-remote [email protected]:user/Oxidized-configs.git
    
  4. Observed Behavior:
    When Oxidized triggers a push (e.g., after a configuration update), it fails with the Rugged::NetworkError indicating "unsupported URL protocol".

Expected Behavior:
The hook should successfully push the local changes to the remote repository using the scp-like SSH URL. The custom port configured in ~/.ssh/config should be used automatically without causing protocol errors.

Environment Details:

  • Oxidized Version: [0.30.1]
  • Operating System: [Ubuntu 20.04 / Docker container with UID=1000]
  • Git Server: Gitea hosted at domain.local, custom SSH port 2222

Additional Notes:

  • I have verified that the SSH keys are correctly generated and that the public key is added to my Git server account.
  • The scp-like URL syntax (with a colon between host and path) is used as documented.
  • Manual Git operations (push, ls-remote) work correctly outside of Oxidized.
  • Removing any HTTPS/SSL parameters has been attempted; the goal is to use SSH exclusively.

Request:
Please advise on how to resolve this error. If additional information or logs are needed to diagnose the issue further, let me know what details would be helpful.

JonasIBK avatar Mar 04 '25 11:03 JonasIBK

https://github.com/ytti/oxidized/blob/master/docs/Issues.md

robertcheramy avatar Mar 05 '25 06:03 robertcheramy

Okay hope i improved the issue!

JonasIBK avatar Mar 05 '25 09:03 JonasIBK

I had the same issue today and tried ssh url and it worked.

Maybe you could try something like this

remote_repo: "ssh://[email protected]:2222/user/Oxidized-configs.git"

0xlee avatar Mar 12 '25 12:03 0xlee

Update to the latest oxidized version. You'll get an error message telling if you installed rugged with ssh support.

robertcheramy avatar Mar 28 '25 20:03 robertcheramy

This issue is stale because it has been open 90 days with no activity.

github-actions[bot] avatar Jul 01 '25 02:07 github-actions[bot]