Jenkins无法连接到gitlab端口443
我试图从Jenkins连接到gitlab,但我一直收到以下错误:Jenkins无法连接到gitlab端口443,jenkins,gitlab,Jenkins,Gitlab,我试图从Jenkins连接到gitlab,但我一直收到以下错误: Started by user Marko Zadravec Building in workspace /var/jenkins_home/... using credential ... > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config r
Started by user Marko Zadravec
Building in workspace /var/jenkins_home/...
using credential ...
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://gitlab.xxxx.git # timeout=10
Fetching upstream changes from https://gitlab.xxxx.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials new correct
> git fetch --tags --progress https://gitlab.xxxx.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://gitlab.xxxx.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:894)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1161)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
at hudson.scm.SCM.checkout(SCM.java:504)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1819)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://gitlab.xxxx.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: fatal: unable to access 'https://gitlab.xxxx.git/': Failed to connect to gitlab.xx.si port 443: Connection timed out
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:442)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:892)
... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
但是,如果在安装了witch Jenkins的同一台机器上的终端上运行命令
git fetch --tags --progress https://gitlab.xxxx.git +refs/heads/*:refs/remotes/origin/*
它正在工作
编辑:
对于git,我使用用户和密码
编辑2
我现在发现,获取git停止了我以前所有的项目,。。。
我怀疑这意味着用户不是问题,而是其他问题
有人知道应该在哪里查找问题吗?看起来您的Jenkins环境没有使用SSH密钥/令牌,
git
命令因此未经授权。您能否检查Jenkins环境是否包含某种授权方式,以及是否正确使用?另一种可能的解释是,您的Jenkins环境正在使用一个gitlab用户帐户(或其SSH/令牌密钥),该帐户未添加到您试图从中获取的项目中。我使用的用户是git项目的管理员。。。我加上picture@Václav,您确定(以及为什么/如何)此错误是由于身份验证导致的吗?看起来您的Jenkins环境没有使用SSH密钥/令牌,因此,git
命令未经授权。您能否检查Jenkins环境是否包含某种授权方式,以及是否正确使用?另一种可能的解释是,您的Jenkins环境正在使用一个gitlab用户帐户(或其SSH/令牌密钥),该帐户未添加到您试图从中获取的项目中。我使用的用户是git项目的管理员。。。我加上picture@Václav,您确定(以及为什么/如何)此错误是由于身份验证造成的吗?