jx icon indicating copy to clipboard operation
jx copied to clipboard

jx pipeline start ask for credentials even though they are supplied

Open msvticket opened this issue 3 years ago • 10 comments

jx pipeline start asks for credentials even though they are supplied with GIT_USERNAME / GIT_TOKEN or --git-username / --git-token. It seems like it is git that asks for it during git clone.

If a git credential store with the crediental is set up this doesn't happen. So it's typically in a use case like mine it happens: Executing jx pipeline start in a cronjob.

This bug didn't exist in version 0.0.143. I think the regression appeared with jenkins-x-plugins/jx-pipeline#396, which would mean that it was introduced in 0.0.148.

The jx pipeline command is built from the repository https://github.com/jenkins-x-plugins/jx-pipeline/

msvticket avatar Oct 03 '22 16:10 msvticket

Hey @msvticket, can we discuss the technical aspect required to achieve a solution for this, I would love to work on this issue.

KiranSatyaRaj avatar Nov 22 '22 06:11 KiranSatyaRaj

Sure! I investigated a bit more now and changed the description accordingly.

msvticket avatar Nov 22 '22 17:11 msvticket

I can give a bit more details:

I think it's the argument to gitv2.NewClientFactory here that needs fixing.

It seems like James was on his way to avoid this regression when working on the PR I mention above.

In this commit he had a more fleshed out configureOpts. I suppose there was a reason he reverted that part, but it might be a start.

msvticket avatar Nov 22 '22 17:11 msvticket

Sure! I investigated a bit more now and changed the description accordingly.

Awesome, I'll work this out from here on, I'll get back to you if there's anything I'm stuck with, I'll make sure to notify you in your time zone, GMT right?

KiranSatyaRaj avatar Nov 22 '22 17:11 KiranSatyaRaj

Sound good

Almost. Stockholm time, so London+1h

msvticket avatar Nov 22 '22 18:11 msvticket

/assign

KiranSatyaRaj avatar Nov 23 '22 13:11 KiranSatyaRaj

Hey @msvticket, I didn't work with Git much and had less idea on how to deal with it, all these days I was learning Git and blogging it along the way, I'm back now and will start working on this issue, you've provided enough info to know more about the issue, thanks Maren

KiranSatyaRaj avatar Nov 28 '22 13:11 KiranSatyaRaj

the value for this var configureOpts, is to be configured here right? @msvticket

KiranSatyaRaj avatar Nov 29 '22 13:11 KiranSatyaRaj

Hey @msvticket, this works, the tests seem to pass as well, can you take a look? Screenshot from 2022-11-30 16-08-26

Screenshot from 2022-11-30 16-06-23

KiranSatyaRaj avatar Nov 30 '22 10:11 KiranSatyaRaj

hey @msvticket , can you please check this through?

KiranSatyaRaj avatar Dec 01 '22 22:12 KiranSatyaRaj