-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task/jenkins 42120 git creation credential changes #895
Task/jenkins 42120 git creation credential changes #895
Conversation
…tive primarily) were showing through the modal due to opacity / stack order
…-changes # Conflicts: # blueocean-dashboard/src/main/less/creation/git.less # blueocean-dashboard/src/main/resources/jenkins/plugins/blueocean/dashboard/Messages.properties
…n-credential-changes # Conflicts: # blueocean-commons/src/main/java/io/jenkins/blueocean/commons/ErrorMessage.java # blueocean-github-pipeline/src/main/java/io/jenkins/blueocean/blueocean_github_pipeline/GithubPipelineCreateRequest.java
…n errors returned from "create" REST API; errors other than "name conflict" are displayed in error step with extra info for debugging
…n-credential-changes # Conflicts: # blueocean-commons/src/main/java/io/jenkins/blueocean/commons/ErrorMessage.java # blueocean-github-pipeline/src/main/java/io/jenkins/blueocean/blueocean_github_pipeline/GithubPipelineCreateRequest.java
…ated with the wrong values
…equired" to a "credentialId" error rather than "uri" error
…ng to invalid URL and invalid credential errors
So basically - I don[t think the git@ case is working in the current form for this at all. HTTP case worked, but not git@. |
EDIT: in previous version, ssh private key didn't work correctly either. The easiest way to test is just to rename your ssh key in ~/.ssh so you know it isn't being used. |
@michaelneale good catches. Will look into the validation field mismatch. The "none" option was a bad assumption on my part about how to handle it, will fix that too. Realized also that Dropdown needs a couple of tweaks to really polish it up, so I'm going to do that today too in a separate JDL PR. |
…move hacky "selectOption" from GitConnectStep
…w the user to choose "none" afterward
…t authenticated" error message into a validation error against the credentialId
@michaelneale both issues should now be fixed. |
@cliffmeyers I still can't use git@github.com:multibranchorg/newbie.git with the "none" credential - but it should default to using the system right?
on server. The error message is better now - says it is credential error vs url error... so that is good at least, but something isn't right with the system credential "none" option. |
@cliffmeyers yes I confirmed with master that if it says "system" it would use my id_rsa as I expect, from disk, and I could clone private repos via ssh. "none" in this case does not behave like that - is that intended? |
I checked with classic, and "none" actually means none - ie it will delegate to the id on the system via the git client, not jenkins internal key. So this is not consistent behavior with previous master or classic - @vivek may need to tweak that assuming it is on the server side (probably is). |
@cliffmeyers where does the name 'none' come from? Can we make the name reflect what credential it is? It would be good to italicise its name in the dropdown to differentiate it from user defined credentials. |
@i386 credential of "none" is exactly that: calling the creation API with a null credentialId. I can style the text no problem. @MichaelNeal @i386 @vivek at this point I don't know exactly how to proceed. I guess we have the following questions:
|
Thats right, if you access git over ssh protocol, you need to provide your ssh keys, even for public repos.
I am confused. Just send null credentialId if user doesn't provide any credential, then all the defaulting behavior will be as per underlying branch-source plugin.
Check the classic defaulting behavior thats what will happen in this case as well. |
@vivek thanks, this makes sense now. I will follow up with a side conversation to get UI nailed down. |
@cliffmeyers @vivek I think "none" (even if we tweak the exact name) should work the same as running: "git clone git@thing.com/bar.git" ie, it is up to my system config to decide what public key to use (for me that is ~/.ssh/config - which says to use id_rsa for github.com addresses). Not sure if it shoudl be called "none" or something else, but that would make it consistent at least. |
…ion in credentials dropdown. will use no credential for HTTP/S URLs and will use "default system ssh" credential for all others
…de nixed Dropdown.selectOption method; instead use a small hack to alter the Dropdown's internal state
@michaelneale ready for re-test now. |
…-changes # Conflicts: # blueocean-core-js/package.json # blueocean-dashboard/npm-shrinkwrap.json # blueocean-dashboard/package.json # blueocean-personalization/npm-shrinkwrap.json # blueocean-personalization/package.json # blueocean-web/npm-shrinkwrap.json # blueocean-web/package.json
This will need a master bump to pass the ATH as there was a recent merge for functionality around artifacts and the ATH. This requires a small change in master behavior which is not here (hence ATH fails). |
@cliffmeyers if you update to master to get ATH to pass - I think this can go in if it sniffs ok. Assume a 🐝 if all checks out. |
Description
Submitter checklist
Reviewer checklist