Skip to content

Support gitlab secure files

Manon Blanco requested to merge support-gitlab-secure-files into master

Closes #134 (closed)

I was able to list folders of a preprod corpus with:

export CI=true
export CI_API_V4_URL=https://gitlab.teklia.com/api/v4/
export CI_JOB_TOKEN=<my_personal_token>
export CI_PROJECT_ID=173

arkindex -p preprod --gitlab-secure-file=arkindex-cli.yaml \
  elements list --corpus 34b4a57e-e766-42af-bf39-131d038f3229 --type folder

and

diff --git a/arkindex_cli/auth.py b/arkindex_cli/auth.py
index fcb634f..e20ba78 100644
--- a/arkindex_cli/auth.py
+++ b/arkindex_cli/auth.py
@@ -62,7 +62,7 @@ class Profiles(dict):
         def make_request(path: str) -> Response:
             response = requests.get(
                 urljoin(base_url, path),
-                headers={"JOB-TOKEN": job_token},
+                headers={"PRIVATE-TOKEN": job_token},
                 allow_redirects=False,
             )
Edited by Manon Blanco

Merge request reports