Rugged::NetworkError: unsupported URL protocol using scp-like URL with custom SSH port
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:
- 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" - SSH Client Configuration (in ~/.ssh/config):
Host server.domain.local Port 2222 - Manual Test:
Executing the following command works as expected:git ls-remote [email protected]:user/Oxidized-configs.git - 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.
https://github.com/ytti/oxidized/blob/master/docs/Issues.md
Okay hope i improved the issue!
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"
Update to the latest oxidized version. You'll get an error message telling if you installed rugged with ssh support.
This issue is stale because it has been open 90 days with no activity.