Skip to content

No support for custom SSH port #1315

Open
@dieselburner

Description

@dieselburner

Seems like github-server-url is dropping custom SSH port, while URL is valid:

- name: Check out repository code
  uses: actions/checkout@v3
  with:
    github-server-url: ssh://git@git.example.com:12345
    ssh-key: ${{ secrets.SSH_KEY }}

Excerpt from logs:

::save-state name=isPost::true
::add-matcher::/run/act/actions/actions-checkout@v3/dist/problem-matcher.json
Syncing repository: org/repo
::group::Getting Git version info
Working directory is '/org/repo'
[command]/usr/bin/git version
git version 2.30.2
::endgroup::
Temporarily overriding HOME='/tmp/9c8d9181-98bf-45f7-9d40-1aa261a81728' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /org/repo
::save-state name=setSafeDirectory::true
Deleting the contents of '/org/repo'
::save-state name=repositoryPath::/org/repo
::group::Initializing the repository
[command]/usr/bin/git init /org/repo
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /org/repo/.git/
[command]/usr/bin/git remote add origin git@git.example.com:org/repo.git
::endgroup::
::group::Disabling automatic garbage collection
[command]/usr/bin/git config --local gc.auto 0
::endgroup::
::group::Setting up auth
[command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
[command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/git\.example\.com\:10000\/\.extraheader
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/git\.example\.com\:10000\/\.extraheader' && git config --local --unset-all 'http.https://git.example.com:10000/.extraheader' || :
::save-state name=sshKeyPath::/tmp/5d03bc11-c322-4924-b7e2-a72407dbb54c
::save-state name=sshKnownHostsPath::/tmp/5d03bc11-c322-4924-b7e2-a72407dbb54c_known_hosts
Temporarily overriding GIT_SSH_COMMAND="/usr/bin/ssh" -i "$RUNNER_TEMP/5d03bc11-c322-4924-b7e2-a72407dbb54c" -o StrictHostKeyChecking=yes -o CheckHostIP=no -o "UserKnownHostsFile=$RUNNER_TEMP/5d03bc11-c322-4924-b7e2-a72407dbb54c_known_hosts"
[command]/usr/bin/git config --local core.sshCommand "/usr/bin/ssh" -i "$RUNNER_TEMP/5d03bc11-c322-4924-b7e2-a72407dbb54c" -o StrictHostKeyChecking=yes -o CheckHostIP=no -o "UserKnownHostsFile=$RUNNER_TEMP/5d03bc11-c322-4924-b7e2-a72407dbb54c_known_hosts"
[command]/usr/bin/git config --local http.https://git.example.com:10000/.extraheader AUTHORIZATION: basic ***
::endgroup::
::group::Fetching the repository
[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +7965e47f829dbbebb91cd74d815073ced5508a02:refs/remotes/origin/master
ssh: connect to host git.example.com port 22: Network is unreachable
fatal: Could not read from remote repository.
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions