gitlab-search
gitlab-search copied to clipboard
force port 443
Hello,
I cannot force on port 443, the first request uses the HTTPS protocol on the default port, but from the second request it switches to port 80
$ cat .gitlabsearchrc
{"token":"XXXXXXXXXXXXX","domain":"https://gitlab.intranet.mycompany.fr","ignoreSSL":true}
$ DEBUG=1 gitlab-search here-is-my-search-term
Requesting: GET https://gitlab.intranet.mycompany.fr/api/v4/groups?per_page=100
Requesting: GET https://gitlab.intranet.mycompany.fr:80/api/v4/groups?order_by=name&owned=false&page=2&per_page=100&sort=asc&statistics=false&with_custom_attributes=false
Something exploded! Error: write EPROTO 139896227686272:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
$ cat .gitlabsearchrc
{"token":"XXXXXXXXXXXXX","domain":"https://gitlab.intranet.mycompany.fr:443"}
$ DEBUG=1 gitlab-search here-is-my-search-term
Requesting: GET https://gitlab.intranet.mycompany.fr:443/api/v4/groups?per_page=100
Requesting: GET https://gitlab.intranet.mycompany.fr:80/api/v4/groups?order_by=name&owned=false&page=2&per_page=100&sort=asc&statistics=false&with_custom_attributes=false
Something exploded! Error: write EPROTO 140273917437824:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
Best Regards Merouane
Hello,
I would like to follow up on this issue that has never been resolved.
I am encountering the exact same error. The initial GET requests use the HTTPS protocol without any problems, but then a request uses HTTP, which triggers the same error as mentioned above. Whether I use the "--ignore-ssl" option or not, it doesn't make any difference.
Best Regards
Ted
Hi folks,
Thanks for sharing what you've encountered 👍🏻
I'll be honest and say it's several years since I used this CLI myself. Even the source code is hard for me to grasp these days, since I havent been writing ReasonML for as long either.
Here's my observations by skimming through the source code tho:
- Initial request is created in full by the CLI, meaning we have full control of the scheme, port etc
- Subsequent requests often use URLs provided by the respective GitLab installation, when it responds to the request described above
This seems to have been exemplified in @merouaneagar' issue description: the 2nd request contains a loooong list of extra query parameters. None of those parameters are known by this CLI project, hence that URL is likely to come from the GitLab installation instead.
Does that sound familiar? Meaning, any chance your custom GitLab setup has some invalid port configurations in its setup, resulting in the URLs the GitLab instance returns back to you, is affected by those port configurations?