Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git Openshift 3.11源代码到映像(s2i)构建不使用标准ssh端口_Git_Ssh_Openshift_Okd_S2i - Fatal编程技术网

Git Openshift 3.11源代码到映像(s2i)构建不使用标准ssh端口

Git Openshift 3.11源代码到映像(s2i)构建不使用标准ssh端口,git,ssh,openshift,okd,s2i,Git,Ssh,Openshift,Okd,S2i,我试图使用OpenShift s2i构建来构建一个映像,从非标准端口222上的git repo中提取源代码 我认为这就像在git repo url中指定端口一样简单,但是这似乎不起作用。当我运行此操作时,会得到以下结果: Cloning "git@ssh.gitlab.intnerldomain.com:222/myorg/myproject.git" ... WARNING: timed out waiting for git server, will wait 1m4s error: ssh

我试图使用OpenShift s2i构建来构建一个映像,从非标准端口222上的git repo中提取源代码

我认为这就像在git repo url中指定端口一样简单,但是这似乎不起作用。当我运行此操作时,会得到以下结果:

Cloning "git@ssh.gitlab.intnerldomain.com:222/myorg/myproject.git" ...
WARNING: timed out waiting for git server, will wait 1m4s
error: ssh: connect to host ssh.gitlab.intnerldomain.com port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
请注意,git url包含:222,但错误消息表明它正在使用端口22


我如何告诉Openshift,特别是从源到映像,使用自定义端口?

要在Git中的ssh URL中使用端口,请使用ssh://user@主机:port/path/to/repo.git语法。速记user@host:路径语法不允许端口插入。您使用的URL相当于:

ssh://git@ssh.gitlab.intnerldomain.com/222/myorg/myproject.git