I am attempting to access the list of projects from a private/internal GitLab host with ML's URLRead function. I have been successful accessing the data via a browser as well as from the following command in a terminal:
curl --cert /path/to/certs.pem:its_password --header "Authorization: Bearer users_personal_access_token" https://private.gitlab.com/api/v4/projects
(with the proper values of 'its_password', 'users_personal_access_token', and 'private.gitlab.com' private git lab host). Unfortunately in WL I am unable to replicate the query with various iterations of the following:
URLRead[
HTTPRequest[
"Scheme"->"https",
"Domain"->"private.gitlab.com",
"Path"->"/api/v4/projects"
],
All,
Authentication-><|
"Headers"-><|"Authorization"->"Bearer users_personal_access_token"|>,
"PEMFile"->"/path/to/certs.pem",
"PEMFilePassword"->"its_password"
|>
]
The URLRead returns errors "400 No required SSL certificate was sent." The various iterations are moving things around, such as removing the "Authentication->..." and moving the "Header"->... inside the HTTPRequest above it; also replacing "PEMFile" (etc.) with "ClientCertificate", "CertificateFile", depending on how Mathematica Stack Exchange, Microsoft Copilot, and Claude feel that day. Even took Wireshark traces of "curl" and "URLRead"; that was overwhelming and did not manage to get any useful comparison due to my lack of experience.
Have you been successful querying services that require authentication (particularly GitLab)? How did you do it? Any assistance would be great, and thank you for your time.