mvisonneau / gitlab-ci-pipelines-exporter

Prometheus / OpenMetrics exporter for GitLab CI pipelines insights
Apache License 2.0
1.29k stars 242 forks source link

Cannot use with PRIVATE-TOKEN (Cannot change AuthType) #583

Open ravindukrs opened 1 year ago

ravindukrs commented 1 year ago

Hi,

My company has an instance running an older version of GitLab. The access token that can be generated in this version is a "Private Access Token". The header for the request is expected to be in the following format: curl --header "PRIVATE-TOKEN: XXXXXXXXXXXXX" "http://gitlab.XXXXXXX.net/api/v4/projects/"

As per my investigation this project currently only allow OAuth bearer tokens which follows following header; curl --header "Authorization: Bearer XXXXXXXXXX" "http://gitlab.XXXXXXX.net/api/v4/projects/" Not sure how we can make this change. Thanks

ycyin commented 1 year ago

I solved it using nginx proxy