jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-66366] Credential test does not detect missing access to collaborators

Open
#1,369 3 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

When specifying a valid GH credential to access a public GH repo (e.g. in jenkinsci), it tests as successful:


Credentials ok. Connected to https://github.com/jenkinsci/matrix-auth-plugin.


But when running the pipeline with the default branch discovery (discover PRs, trust users with Admin/Write access), exceptions will occur during the scan that the /collaborators URL is inaccessible.

```
java.io.FileNotFoundException: https://api.github.com/repos/jenkinsci/matrix-auth-plugin/collaborators/daniel-beck/permission
```

I'd expect a warning in the credential validation test. While a pipeline can be configured to not need permission lookup, given it's both common and the default, that seems like a bug.

---
Originally reported by danielbeck, imported from: Credential test does not detect missing access to collaborators


  • status: Open
  • priority: Minor
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 5
  • imported: 2025-12-02

Raw content of original issue

When specifying a valid GH credential to access a public GH repo (e.g. in jenkinsci), it tests as successful:


Credentials ok. Connected to https://github.com/jenkinsci/matrix-auth-plugin.


But when running the pipeline with the default branch discovery (discover PRs, trust users with Admin/Write access), exceptions will occur during the scan that the /collaborators URL is inaccessible.



java.io.FileNotFoundException: https://api.github.com/repos/jenkinsci/matrix-auth-plugin/collaborators/daniel-beck/permission 


I'd expect a warning in the credential validation test. While a pipeline can be configured to not need permission lookup, given it's both common and the default, that seems like a bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.