Skip to content
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

Support GitLab token to access private projects #1266

Closed
sanmai-NL opened this issue Oct 10, 2023 · 3 comments
Closed

Support GitLab token to access private projects #1266

sanmai-NL opened this issue Oct 10, 2023 · 3 comments

Comments

@sanmai-NL
Copy link

A GitHub token is already accepted as CLI argument. But I don't see what it translates to in terms of HTTP request.
See https://docs.gitlab.com/ee/api/repository_files.html#get-raw-file-from-repository for how to access a raw file from a private project. I'm not sure that is appropriate for my use case: I simply hyperlink to private project landing pages, which are flagged by Lychee under CI.

@sanmai-NL sanmai-NL changed the title Support GitLab CI token to access private projects Support GitLab token to access private projects Oct 10, 2023
@mre
Copy link
Member

mre commented Oct 10, 2023

Gitlab is currently not supported, but we can add a gitlab_token argument similar to GitHub.
Contributions welcome. I'm not sure when I would get the opportunity to add this myself.

The GitHub token gets passed to the GitHub crate, octokit. That's the only place where it gets used. However, for gitlab, we can start to pass it as a header if it's a gitlab URL.

@sanmai-NL
Copy link
Author

I tested and found that specific support for GitLab is unnecessary, using the --header CLI/configuration parameter PRIVATE-TOKEN=.... However, this is not usable yet for our applications in CI, due to #1297 and in particular #1298.

@mre
Copy link
Member

mre commented Jan 29, 2024

Closing this in favor of fixing #1298.

@mre mre closed this as completed Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants