Timeline
I have a git repository on a ssh server that doesnt run on the default port 22.
It is configured with a Port entry in my ~/.ssh/config file, so the normal "ssh" command and the "git" command works:
Host srv
Port 1234
The git remote just looks like this: "user@srv:repo"
Doing "git push" works, but trying to do a "git bug push", I end up with the following:
❯ git bug push
Error: dial tcp 192.168.1.5:22: connectex: No connection could be made because the target machine actively refused it.
I think it's an issue with a dependency.
(running in Windows & PowerShell)
Nevermind, it seem to be unrelated issue.
Martin Lindhe (martinlindhe) closed the bug 3 years ago
Actually, I am at loss. Can not seem to use any port except 22.
I just tested on macOS, and get a similar error:
Error: dial tcp 192.168.1.5:22: connect: connection refused
Martin Lindhe (martinlindhe) opened the bug 3 years ago
Possibly related: https://github.com/go-git/go-git/issues/509
Possibly related: go-git/go-git#509
Thanks for pointing me in the right direction!
I worked around the issue on my end for now by changing port on https://github.com/go-git/go-git/blob/f9b2cce5c9e6510fefb21ce54c07b59e83b6da8f/plumbing/transport/common.go#L244 and add a replace to go.mod, but that really needs to be fixed (in go-git ofc)
Michael Muré (MichaelMure)
added label
go-git
3 years ago
Another workaround for this is to explicitly specify the port in your git remote, for example ssh://git@example.com:1234/somerepo.git. This seems to work with both git-bug and regular git.
github-actions (github-actions)
added label
lifecycle/stale
1 year ago
sudoforge
removed label
go-git
1 year ago
github-actions (github-actions)
added label
lifecycle/rotten
10 months ago
github-actions (github-actions)
removed label
lifecycle/stale
10 months ago
github-actions (github-actions)
removed label
lifecycle/dormant
7 months ago
sudoforge changed the title from git-bug does not load custom ssh configuration to git-bug does not load custom ssh configuration 7 months ago
sudoforge
added label
kind/bug
7 months ago
sudoforge
added label
priority/important-soon
7 months ago
sudoforge
added label
area/git
7 months ago
sudoforge
removed label
area/git
7 months ago
sudoforge
added label
area/ssh
7 months ago