【发布时间】:2017-10-16 04:56:25
【问题描述】:
我是 Jenkins 的新手,正在尝试设置一个服务器以从 GitHub 存储库运行 selenium 测试。我确定我做错了什么,可能有几件事情,但一直无法弄清楚。
我已将 selenium 插件配置为使用默认的 Selenium 集线器端口 4444。
无法弄清楚为什么我会收到此错误。凭据与创建的用户名和 ssh 密钥匹配。我什至可以通过单击项目仪表板中的GitHub 来访问存储库。
构建前的执行步骤。这些是我在终端中用来在本地运行测试的命令。
当我构建作业时,它会给出以下日志:
Started by <user>
Building in workspace /Users/Shared/Jenkins/Home/workspace/Tutorial
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/<repo address>.git # timeout=10
Fetching upstream changes from https://github.com/<repo address>.git
> git --version # timeout=10
using GIT_SSH to set credentials
> git fetch --tags --progress https://github.com/<repo address>.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/<repo address>.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
at hudson.scm.SCM.checkout(SCM.java:496)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://github.com/<repo address>.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/<repo address>.git/'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1877)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1596)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
... 11 more
ERROR: null
Finished: FAILURE
【问题讨论】:
-
请在问题中输入minimal reproducible example。
-
@jonrsharpe 您想要我尝试运行的测试示例吗?什么例子会有帮助?
-
从它说它无法通过 git 进行身份验证的错误中,所以它是你需要修复的第一件事
标签: python selenium github jenkins remote-server