Jenkins GitHub vie Blue Ocean代理:用户名或密码无效

Jenkins GitHub vie Blue Ocean代理:用户名或密码无效,jenkins,github,credentials,jenkins-blueocean,github-enterprise,Jenkins,Github,Credentials,Jenkins Blueocean,Github Enterprise,我在谷歌上搜索的是: remote: Invalid username or password. 要稍微回溯一下,请执行以下操作: 我使用Jenkins上的Blue Ocean创建了一个管道来运行GitHub Enterprise上存储的东西。我们的内部企业支持http连接(而不是https或ssh)。API令牌帮助jenkins master成功地与github交互,包括获取管道并将管道推送到repo 在执行时,作业被转发给代理。该代理尝试与主机一样连接到给定地址,但没有成功获取内容,而是收

我在谷歌上搜索的是:

remote: Invalid username or password.
要稍微回溯一下,请执行以下操作:

我使用Jenkins上的Blue Ocean创建了一个管道来运行GitHub Enterprise上存储的东西。我们的内部企业支持http连接(而不是https或ssh)。API令牌帮助jenkins master成功地与github交互,包括获取管道并将管道推送到repo

在执行时,作业被转发给代理。该代理尝试与主机一样连接到给定地址,但没有成功获取内容,而是收到消息:

stderr: remote: Invalid username or password.
我想弄清楚的是令牌是如何从主机到代理的,以及为什么在我的情况下不起作用

在谷歌搜索的过程中,我发现了好几次这种症状——似乎都不适用于我的情况

我认为正在发生的是,节点使用双因素而不是令牌,然后GIT_ASKPASS似乎再次生成令牌-在这种情况下,我不知道为什么令牌对主节点有效,但对代理无效

这是蓝海日志-为了匿名稍微做了些修改

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。

相关性不是因果关系,而是我激活了
启用代理→ 在
Jenkins->Configure Global Security
中设置主访问控制
,此时SCM步骤成功

编辑:我处理了凭证,删除了一些凭证并重新创建了一个令牌。之后,错误再次出现。取消选中该选项,点击apply,然后点击Check,点击apply为我修复了这个问题