我在使用Jenkins识别我的Git代码库时遇到了麻烦。如下图所示。我被告知使用
有趣的是,当我从命令行执行相同的命令时,它可以正常工作并从代码库中获取文件。
当我在Jenkins中输入URL和环境变量时,它显示无法连接到仓库。有人知道我需要做什么才能使其正常工作吗?感谢您提前的帮助。
更新/澄清:Jenkins安装在服务帐户下,与公司内任何用户无关。
更新#2: 这是控制台输出。我已经对其进行了一些消毒处理,所以如果我漏掉了什么,请见谅。
git clone https://blah/blah.git
可以将代码克隆为只读,无需凭据或密钥。我想要拉取代码并构建它。有趣的是,当我从命令行执行相同的命令时,它可以正常工作并从代码库中获取文件。
export GIT_SSL_NO_VERIFY=true
git clone https://blah.com:8443/blah.git
当我在Jenkins中输入URL和环境变量时,它显示无法连接到仓库。有人知道我需要做什么才能使其正常工作吗?感谢您提前的帮助。
更新/澄清:Jenkins安装在服务帐户下,与公司内任何用户无关。
更新#2: 这是控制台输出。我已经对其进行了一些消毒处理,所以如果我漏掉了什么,请见谅。
Started by user anonymous
Building in workspace /home/hduser/.jenkins/workspace/analytics
Fetching changes from the remote Git repository
Fetching upstream changes from https://blah.com:8443/blah.git
FATAL: Failed to fetch from https://blah.com:8443/blah.gitt
hudson.plugins.git.GitException: Failed to fetch from https://blah.com:8443/blah.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:836)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1411)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)
at hudson.model.Run.execute(Run.java:1665)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:246)
Caused by: hudson.plugins.git.GitException: Failed to connect to https://blah.com:8443/blah.git
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1391)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:167)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:610)
... 10 more
curl https://blah.com:8443/proj.git
这样的东西? - Max Leskegit clone https://blah.com:8443/proj.git
,然后我会看到所有这些活动在屏幕上闪现,几秒钟后,我就可以在当前目录中看到来自Git存储库的文件了。 - Classified