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

Gitlab private repo support in factory URL using personal access tokens #19170

Closed
mshaposhnik opened this issue Mar 1, 2021 · 0 comments
Closed
Assignees
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Mar 1, 2021

Is your task related to a problem? Please describe.

Support private GitLab repos for factories with authentication using pre-created personal access token stored as a secret in Che user namespace.

Describe the solution you'd like

  • Extract user and project names from original factory request:
    https://che-che.host.nip.io/f?url=https://gitlab.host/user_foo/test1.git

  • Query GitLab API to fetch project information:
    [Makis@linux gitlab]curl --header "PRIVATE-TOKEN: DYF627ozzSHM-<yup>" "https://gitlab.192.168.39.243.nip.io/api/v4/projects/user_foo%2Ftest1".

  • Query GitLab API to fetch devfile content:

[Makis@linux gitlab]$ curl --header "PRIVATE-TOKEN: DYF627ozzSHM-<yup>" "https://gitlab.192.168.39.243.nip.io/api/v4/projects/{project-id}/repository/files/devfile.yaml/raw?ref=master"
  • Clone repo:
git clone https://gitlab.host/user_foo/test1.git
Username: user_foo
Password: DYF627ozzSHM-<yup>

Describe alternatives you've considered

Additional context

Gitlab installation instructions:
https://gist.github.com/mshaposhnik/7c96ae19af9f87bd7f46080f1c54565d

@mshaposhnik mshaposhnik added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Mar 1, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Mar 1, 2021
@Katka92 Katka92 added area/git severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Mar 1, 2021
@skabashnyuk skabashnyuk added this to the 7.28 milestone Mar 3, 2021
@mshaposhnik mshaposhnik self-assigned this Mar 22, 2021
@skabashnyuk skabashnyuk modified the milestones: 7.28, 7.29 Mar 24, 2021
@l0rd l0rd added the new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes label Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

5 participants