我在谷歌上搜索的是:
remote: Invalid username or password.
稍微后退一点:
我用Jenkins上的BlueOcean创建了一个管道来运行我们的Github企业中存储的东西。我们的内部企业支持HTTP连接(而不是HTTPS或SSH)。API令牌帮助Jenkins Master成功地与GitHub交互,包括获取和将管道推送到repo。
在执行时,作业被转发给代理。该代理尝试像主服务器一样连接到给定的地址,但没有成功获取其获取消息的内容:
stderr: remote: Invalid username or password.
我想弄明白的是令牌是如何从主服务器获取到代理的,以及为什么在我的情况下不起作用。
在谷歌搜索的时候,我发现了一些症状——似乎没有一个适用于我的情况。
我认为正在发生的是,节点使用的是两个因素而不是令牌,然后Git_AskPas似乎再次生成了令牌-在这种情况下,我不知道令牌为什么对主服务器有效,但对代理无效。
这是蓝海日志-匿名略有变化。
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository http://github.mycompany.de/myorg/myrepo.git
> git init C:\jenkins\nodes\guinode\workspace\myrepo_master-CFRRXMXQEUULVB4YKQOFGB65CQNC4U5VJKTARN2A6TSBK5PBATBA # timeout=10
Fetching upstream changes from http://github.mycompany.de/myorg/myrepo.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials GitHub Enterprise Access Token
Setting http proxy: con-ffm-asg-01.mycompany.de:8080
> git fetch --no-tags --progress http://github.mycompany.de/myorg/myrepo.git +refs/heads/master:refs/remotes/origin/master
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --no-tags --progress http://github.mycompany.de/myorg/myrepo.git +refs/heads/master:refs/remotes/origin/master" returned status code 128:
stdout:
stderr: remote: Invalid username or password.
fatal: Authentication failed for 'http://github.mycompany.de/myorg/myrepo.git/'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2002)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1721)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:614)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:207)
at hudson.remoting.UserRequest.perform(UserRequest.java:53)
at hudson.remoting.Request$2.run(Request.java:358)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:98)
at java.lang.Thread.run(Unknown Source)
Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from myagent.auto.mycompanywan.com/12.13.14.15:58671
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
at hudson.remoting.Channel.call(Channel.java:908)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
at com.sun.proxy.$Proxy98.execute(Unknown Source)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:260)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Error cloning remote repo 'origin'
在代理机器上,我可以看到正在创建的文件夹,因此执行肯定发生在代理端。
我的核心问题是我的令牌发生了什么,以及需要发生什么,以便代理计算机可以连接到我们的企业Github。