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
Axios proxy via cli options #630
Comments
@mamyn0va Can you provide the the full gitlab-ci-local ouput
and paste it here. |
There is nothing more :
Thanks! |
Nothing about missing remote's or anything ? |
No, and it's easily reproducible with this file: include:
- template: Jobs/SAST.gitlab-ci.yml |
Why is it that you think templates shouldn't be fetched from gitlab.com? |
I thought that templates were fetched from the same instance as the .gitlab-ci.yml's one.
…-------- Message d'origine --------
Le 17 oct. 2022 à 18:05, Mads Jon Nielsen a écrit :
Why is it that you think templates shouldn't be fetched from gitlab.com ?
—
Reply to this email directly, [view it on GitHub](#630 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ACWCGTAQIRHYPBM3SV5KWODWDV2NBANCNFSM6AAAAAARHCXQUA).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
And what makes you think that? |
The fact that other templates are fetched from my own instance. |
Do you have any idea why I'm getting 400 errors ? |
No template includes have ever been downloaded from your private gitlab instance, local includes will, but never template includes. Nah, not really... |
Yes, I can do a regular curl to fetch the template from gitlab.com. |
Hey 😊 From what I see in the doc, it seems to be fetched... from the same instance, in a specific folder : https://docs.gitlab.com/ee/ci/yaml/#includetemplate |
Thanks, so the question is : why gitlab-ci-local fetches the template from gitlab.com ? |
The "templates" link points directly to gitlab.com. |
I just tried replacing gitlab.com with gitlab.firecow.dk in this https://gitlab.com/gitlab-org/gitlab/-/raw/master/lib/gitlab/ci/templates/Jobs/SAST.gitlab-ci.yml link, and the file is 404 on my private instance. He is seeing 400... Which indicates, someone is telling the request is "bad" not not found. |
It's expected the 404, by default an instance has no template. This piece of documentation in particular :
Uses a relative path, and it must be empty in your instance. I agree that the 400 error is something else, that we won't tackle together. |
Unfortunately I can't test all of this, my current clients are on gitlab.com. |
I don't get why it must be empty in my instance... |
Because templates are defined by the admin, and you did not put any in your folder ? And on the OP instance, they are defined by the admins... Just guessing at this stage, I can't test any of my assumptions. |
You think they are manually added to self hosted instances? I find that unlikely, since my templates are fetched from gitlab.com, when run on gitlab.firecow.dk... |
I think I can confirm this error is caused by proxy :
this works perfectly without proxy but I got |
Hi @greenmaid, I confirm that it works perfectly without proxy with this file: ---
include:
- template: Jobs/SAST.gitlab-ci.yml
job:
image: alpine
script:
- echo 'hello' |
Ok, let's find out how we shall configure axios proxy then... |
Looking at tcpdump trace, I can say that requests is send via proxy but without CONNECT (as if it was a http URL)
Proxy answers 400
For me it is exactly this bug at axios side: axios/axios#4531 |
Axios + proxy seems historically... complicated 😵 |
We could switch http client library |
I'm gonna come up with some way to specify axios proxy setting via gitlab ci local options. |
Hi @firecow, any update on this ? |
@mamyn0va Haven't looked seriously into it yet. |
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior
It works! :)
Host information
Manjaro
gitlab-ci-local 4.33.1
Additional context
The repo is hosted on a private gitlab instance, and it uses many templates.
I don't know why gitlab-ci-local tries to fetch some templates from gitlab.com instead of my private gitlab instance.
The 400 error may be due to a proxy error (I'm behind a corporate proxy).
The text was updated successfully, but these errors were encountered: