Jenkins uses port configured in Publish over SSH host instead of the default one while pulling/cloning/accessing the repo from the git server (or any other git server presumably).
When setting port explicitly in the repo url everything works fine (but integration with Github stops working).
Started on Jul 12, 2017 6:46:27 PM
Started by event from http:Using strategy: Default
using GIT_SSH to set credentials RepoName
> git ls-remote -h ssh:FATAL: hudson.plugins.git.GitException: Command "git ls-remote -h ssh: returned status code 128:
stderr: ssh: connect to host github.com port 65514: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
hudson.plugins.git.GitException: Command "git ls-remote -h ssh: returned status code 128: