You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What Operating System are you using (both controller, and any agents involved in the problem)?
Windows (should not matter)
Reproduction steps
Create an Organization Folder job Job that make use of the plugin, with the checkout credentials Key.
Set the project owner to a subgroup, named foo/bar
A gitlab project under foo/bar named P
P have an open MR created from a fork someone/P that is a private fork, which gives no access to the checkout credentials Key.
Run the Scan Gitlab Group
Expected Results
During the scanning process of foo/bar/P, the MR is found. The plugin found that it cannot clone the merge-head revision. Thus just ignore this MR, and continue to scan the leaving things.
Actual Results
The entire Scan Gitlab Group failed,
Checking merge request !MR
ERROR: [周日 4月 23 14:29:44 CST 2023] Could not fetch sources from navigator io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator@41831ee7
[周日 4月 23 14:29:44 CST 2023] Finished organization scan. Scan took 6 分 21 秒
FATAL: Failed to recompute children of Job
org.gitlab4j.api.GitLabApiException: 404 Project Not Found
at org.gitlab4j.api.AbstractApi.validate(AbstractApi.java:678)
at org.gitlab4j.api.AbstractApi.get(AbstractApi.java:214)
at org.gitlab4j.api.ProjectApi.getProject(ProjectApi.java:748)
at org.gitlab4j.api.ProjectApi.getProject(ProjectApi.java:680)
at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.retrieve(GitLabSCMSource.java:420)
Caused: java.io.IOException: Failed to fetch latest heads
at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.retrieve(GitLabSCMSource.java:537)
at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:327)
at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:261)
at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1358)
at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1373)
at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:254)
at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:204)
at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator.visitSources(GitLabSCMNavigator.java:294)
at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:535)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:269)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:167)
at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:917)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Any solution to this? I have a workaround where the forked repo must add a user that is based on the credentials configured in the system level jenkins properties for gitlab, but hoping for a better solution
A similar workaround here. We met a consensus that all of the forking respositories must share itself to an ancestor group of the original repository, instead of a user. As the group access token is configured as the credentials. That might be easier than user-based approach.
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Windows (should not matter)
Reproduction steps
Job
that make use of the plugin, with the checkout credentialsKey
.foo/bar
foo/bar
namedP
P
have an open MR created from a forksomeone/P
that is a private fork, which gives no access to the checkout credentialsKey
.Scan Gitlab Group
Expected Results
During the scanning process of
foo/bar/P
, the MR is found. The plugin found that it cannot clone the merge-head revision. Thus just ignore this MR, and continue to scan the leaving things.Actual Results
The entire
Scan Gitlab Group
failed,Anything else?
No response
The text was updated successfully, but these errors were encountered: