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

Features/gitlab custom cert #50

Merged
merged 5 commits into from
Jul 21, 2023
Merged

Conversation

fdbastionamio
Copy link
Contributor

Closes #49

This adds an entry in the gitlab config section called ssl-cert where users can specify the path to the PEM certificate of their gitlab instance if it is using a self-signed certificate.

example configuration:

# socket address for the SSH server to listen on
listen-address = "[::]:2222"

# directory in which the generated private keys for the server
# should be stored
state-directory = "/var/lib/gitlab-cargo-shim/keys"

[gitlab]
# the base url of the gitlab instance
uri = "https://my.gitlab.internal"
ssl-cert = "/etc/ssl/certs/my.gitlab.internal.pem"

# a personal access token of an admin with permission to `sudo` as other
# users and create impersonation tokens. `sudo` is used to fetch all the
# packages the user can access, and the impersonation token is returned
# to the user to download packages
admin-token = "foobar"

@fdbastionamio fdbastionamio reopened this Jul 19, 2023
@fdbastionamio
Copy link
Contributor Author

Apologies - I forgot to run rustfmt and use the user-supplied ssl cert for non-admin requests

@w4
Copy link
Owner

w4 commented Jul 19, 2023

Thanks for the contribution!

@w4
Copy link
Owner

w4 commented Jul 20, 2023

Would you mind fixing the clippy failure please? Other than that, all looks good to me.

@fdbastionamio
Copy link
Contributor Author

Hi, this should work now

@w4 w4 merged commit 2637944 into w4:main Jul 21, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

Support self-signed certs for the gitlab server
2 participants