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

Add support for private GitLab repos #1

Open
arielvinas opened this issue Aug 24, 2020 · 0 comments
Open

Add support for private GitLab repos #1

arielvinas opened this issue Aug 24, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@arielvinas
Copy link
Member

When using module-install, it assumes the repo origin is from GitHub, e.g:

module-install --module-name 'install-rundeck' --repo 'https://github.com/craftech-io/module-ci' --tag 'v0.0.1'`

This uses GITHUB_OAUTH_TOKEN to authenticate for private GitHub repos. When using GitLab, the common use case is to use deploy tokens.

There should be a variable or automatic way to tell module-installer that the repo is from GitLab, in order to use variables for both the token's username (or if a username isn't provided, should use the default gitlab) and token (or using a variable GITLAB_TOKEN env var). e.g:

using flags:

module-install --module-name 'install-rundeck' --gitlab-token-username username  --gitlab-token <token> --repo 'https://gitlab.com/private-repo' --tag 'v0.0.1'

using env vars:

export GITLAB_TOKEN=<token>
module-install --module-name 'install-rundeck' --repo 'https://gitlab.com/private-repo' --tag 'v0.0.1'`

or

export GITLAB_USERNAME=<token_username>
export GITLAB_TOKEN=<token>
module-install --module-name 'install-rundeck' --repo 'https://gitlab.com/private-repo' --tag 'v0.0.1'`
@arielvinas arielvinas added the enhancement New feature or request label Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants