Skip to content

[JENKINS-43822] Fix Jenkins CLI transport auth#83

Merged
samrocketman merged 1 commit into
masterfrom
fix-transport-auth
May 2, 2017
Merged

[JENKINS-43822] Fix Jenkins CLI transport auth#83
samrocketman merged 1 commit into
masterfrom
fix-transport-auth

Conversation

@samrocketman
Copy link
Copy Markdown
Member

@samrocketman samrocketman commented Apr 29, 2017

This fixes using authentication in the following ways:

  • HTTP transport auth.
  • SSH authentication.

Example of the fixed behavior:

$ java -jar jenkins-cli.jar -s http://localhost:8080/ -http -auth samrocketman:[REDACTED personal access token] who-am-i
Authenticated as: samrocketman
Authorities:
  authenticated
  jenkinsci
  jenkinsci*Everyone
  sandscape
  kata-seeds
  kata-seeds*Groovy
  Gitorious-backup
  Gitorious-backup*Owners
  gimp-ci
  gimp-ci*developers

$ java -jar jenkins-cli.jar -s http://localhost:8080 -i ./id_rsa -ssh -user samrocketman who-am-i
Authenticated as: samrocketman
Authorities:
  authenticated

For my tests, I generated a GitHub personal access token with read:org and user:email scopes.

This fixes using authentication in the following ways using HTTP
transport auth and SSH authentication.
@Dispader
Copy link
Copy Markdown

Dispader commented May 1, 2017

Nice. Sure looks like this will address the problem I'm seeing, and is pretty darned elegant.

I don't quite see how this addresses local --username and --password passing, but I did see your comment that you've already tested it (and I don't understand a lot of things 😃 ). If we're thinking that it addresses both use cases, I'd say this is the thing to resolve JENKINS-43822.

In any case, I'll +1 this bigtime, because I'm betting it'll get the Chef Cookbook back up and operational.

And thanks, @samrocketman !

@samrocketman
Copy link
Copy Markdown
Member Author

I'll merge and release this evening unless someone has critical feedback.

@samrocketman samrocketman merged commit 72075ba into master May 2, 2017
@samrocketman samrocketman deleted the fix-transport-auth branch May 2, 2017 03:53
@elasticdog
Copy link
Copy Markdown

Thank you for the quick fix and release! I have been testing v0.27 this morning and can confirm that it has resolved my previous issues. 🥇

@Dispader
Copy link
Copy Markdown

Dispader commented May 3, 2017

🥇 , bigtime. Thanks!

@samrocketman
Copy link
Copy Markdown
Member Author

Thanks all 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants