-
Bug
-
Resolution: Fixed
-
Major
-
None
-
github-oauth-plugin 0.26
matrix-auth-plugin 1.5
Documentation at https://wiki.jenkins-ci.org/display/JENKINS/GitHub+OAuth+Plugin#GitHubOAuthPlugin-CallingJenkinsAPIusingGitHubPersonalAccessTokens says:
One can still call the Jenkins API by using Jenkins tokens or use the Jenkins CLI with an SSH key for authentication. However, the GitHub OAuth plugin provides another way to call the Jenkins API by allowing the use of a GitHub Personal Access Token.
However, I cannot make SSH authentication work (by adding SSH keys to the users being created by the extension) nor Jenkins tokens work (by using the tokens from their profiles).
The only authentication option seems to be:
java -jar /usr/local/bin/jenkins-cli.jar -s https://jenkins -noKeyAuth who-am-i --username elife-alfred-user --password my_github_token
Is the documentation outdated or is it a regression?
- is related to
-
JENKINS-27045 Cannot use jenkins-cli with github oauth plugin
-
- Resolved
-
- relates to
-
JENKINS-44020 non-github accounts can't be used via jenkins-cli or REST APIs
-
- Resolved
-
-
JENKINS-43767 Can't use declarative-linter remotely when using GitHub Authentication
-
- Resolved
-
[JENKINS-43822] Jenkins-cli seems to not support anything different from Github token
Link |
New:
This issue is related to |
I've been hit by this as well and believe this is a regression with v0.26 due to the authentication fix for #27045 (the actual code change is here: https://github.com/jenkinsci/github-oauth-plugin/pull/77). That commit was bad timing with the upstream jenkins-cli change from Jenkins v2.54 that deprecates the CLI's remoting protocol, so the `–username` and `–password` flags are no longer valid options.
With v0.26 of this plugin running on Jenkins v2.56, I haven't been able to get jenkins-cli authentication working properly via any of the client authentication modes, it always reports back as the "anonymous" user, so I can't actually perform any administrative tasks (which breaks our automated configuration management of Jenkins as well).
For now, manually downgrading the plugin to v0.25 using the hpi file has restored functionality, but obviously that's not a good long-term solution. If you need any further details about our setup, please let me know as I'd love to see this get an official fix.