创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。
发帖前请点击 发表主题 右边的 预览(👀) 按钮,确保帖子格式正确。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
Versions Used
KubeSphere: v3.4.1
Kubernetes: Kubernetes 1.29.1-do.0
Environment
3 nodes of 4 GB Memory / 80 GB Disk + 38 GB / SFO2 - Debian do-kube-1.29.1-do.0
How To Reproduce
Steps to reproduce the behavior:
Login to Kubespher dashboard, go to ‘workbench’, click on workspace, create devops project, create pipeline, create repo, create github credential(ensure the github repo is private in a github organization)
Run pipeline
Describe the Bug
Hello there, i have been battling this issue for about a week, when you configure the devops credentials from the UI, using the username and password authentication for github(using a personal access token from github as password). Kubesphere cannot clone the repo.
As you can see in the image below, i can correctly setup a repository thats connected to the repo in my github organization
But when i run any pipeline that needs to clone this repository, i always get this error!
Checking out a fresh workspace because /home/jenkins/agent/workspace/asset-config-service-devops4pzt7/pipeline2 doesn’t exist
Cleaning local Directory .
Checking out https://github.com/betdemand-code/asset-config-service at revision ‘2024-04-22T13:30:39.892 +0000’ –quiet
ERROR: Failed to check out https://github.com/betdemand-code/asset-config-service
org.tmatesoft.svn.core.SVNException: svn: E160013: ‘/betdemand-code/asset-config-service’ path not found: 404 Not Found (https://github.com)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:760)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:910)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:702)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:113)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1047)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:169)
at org.tmatesoft.svn.core.internal.wc16.SVNBasicDelegate.getRevisionNumber(SVNBasicDelegate.java:480)
at org.tmatesoft.svn.core.internal.wc16.SVNBasicDelegate.getLocations(SVNBasicDelegate.java:833)
at org.tmatesoft.svn.core.internal.wc16.SVNBasicDelegate.createRepository(SVNBasicDelegate.java:527)
at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:875)
at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:66)
at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:18)
at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
at hudson.scm.subversion.CheckoutUpdater$SubversionUpdateTask.perform(CheckoutUpdater.java:139)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:176)
at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:138)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
at hudson.scm.SubversionSCM$CheckOutUpdateTask.perform(SubversionSCM.java:1085)
at hudson.scm.SubversionSCM$CheckOutUpdateTask.run(SubversionSCM.java:1066)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1036)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1019)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3329)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:122)
at java.base/java.lang.Thread.run(Unknown Source)
java.io.IOException: Failed to check out https://github.com/betdemand-code/asset-config-service
he main error to me is org.tmatesoft.svn.core.SVNException: svn: E160013: '/betdemand-code/asset-config-service' path not found: 404 Not Found (https://github.com)
and this suggests to me that there is a bug with kubesphere where it is ignoring the configured credentials as you only get the 404 response from github if you do not pass the credentials for org repositories.
To confirm this assumption, i logged in to the devops-jenkins
dashboard deployed in the. namespace kubesphere-devops-system
and then i manually configured a build and configured the SCM to clone the repo using a configuration i made on the jenkins dashboard, no surprises there because it worked as expected.