git - Jenkins Git 插件客户端不使用发布者的凭据
问题描述
当为 Jenkins 构建后操作 Git Publisher 使用 Git 插件时,它似乎没有使用前面在 SCM 设置中指定的凭据。
21:56:14 using credential 1923f64f-615b-4a61-bd60-f9513d40ca54
21:56:14 > git tag -l jenkins-Release_Notes_SVN-34 # timeout=10
21:56:15 > git tag -a -f -m Jenkins Build #34 jenkins-Release_Notes_SVN-34-SUCCESS # timeout=10
21:56:15 Pushing HEAD to branch master at repo origin
21:56:15 > git --version # timeout=10
21:56:15 using GIT_ASKPASS to set credentials xxxx, code read+status, wit read+write, expires 1/24/2020
21:56:15 > git push https://xxx.xxxx.com/xx/xx/_git/release-notes HEAD:master # timeout=10
21:56:28 ERROR: Failed to push branch master to origin
21:56:28 hudson.plugins.git.GitException: Command "git push https://xxx.xxxx.com/xx/xx/_git/release-notes HEAD:master" returned status code 1:
21:56:28 stdout:
21:56:28 stderr: Logon failed, use ctrl+c to cancel basic credential prompt.
21:56:28 fatal: the remote end hung up unexpectedly
21:56:28 fatal: the remote end hung up unexpectedly
21:56:28 error: RPC failed; HTTP 401 curl 22 The requested URL returned error: 401
21:56:28 Everything up-to-date
21:56:28
21:56:28 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2318)
21:56:28 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1905)
21:56:28 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:81)
21:56:28 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:2400)
21:56:28 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
21:56:28 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:154)
21:56:28 at hudson.remoting.UserRequest.perform(UserRequest.java:212)
21:56:28 at hudson.remoting.UserRequest.perform(UserRequest.java:54)
21:56:28 at hudson.remoting.Request$2.run(Request.java:369)
21:56:28 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
21:56:28 at java.util.concurrent.FutureTask.run(Unknown Source)
21:56:28 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
21:56:28 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
21:56:28 at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
21:56:28 at java.lang.Thread.run(Unknown Source)
21:56:28 Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from xx.xx.xx.xx/xx.xx.xx.xxx:xx
21:56:28 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
21:56:28 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
21:56:28 at hudson.remoting.Channel.call(Channel.java:957)
21:56:28 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
21:56:28 at sun.reflect.GeneratedMethodAccessor404.invoke(Unknown Source)
21:56:28 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
21:56:28 at java.lang.reflect.Method.invoke(Method.java:498)
21:56:28 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
21:56:28 at com.sun.proxy.$Proxy102.execute(Unknown Source)
21:56:28 at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:312)
21:56:28 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
21:56:28 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
21:56:28 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
21:56:28 at hudson.model.Build$BuildExecution.post2(Build.java:186)
21:56:28 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
21:56:28 at hudson.model.Run.execute(Run.java:1835)
21:56:28 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
21:56:28 at hudson.model.ResourceController.execute(ResourceController.java:97)
21:56:28 at hudson.model.Executor.run(Executor.java:429)
有人对此有任何想法吗?
解决方案
推荐阅读
- python - 删除字符串中出现的元音
- android - 使用正则表达式进行选择时,ContentResolver.query() 的 Android-studio 问题
- c - 从具有指定字节顺序的二进制 unsigned char* 读取 C 中的 double
- python - Change plt.imshow() into cv2.imshow() in Python
- machine-learning - 机器学习问题中的特征选择
- php - 如何使用 php 和 TCPDF 在 pdf 中绘制虚线?
- regex - 正则表达式替换异常
- docker - 使用 netcat 连接到运行 golang 服务器的 docker 容器
- excel - 显示编译错误:检测到不明确的名称,同时重载函数
- python-3.x - Django Rest如何使用lookup_field获取多个对象