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 private raw URLs with ?token parameter on github.com #22685

Closed
ibuziuk opened this issue Nov 23, 2023 · 3 comments · Fixed by eclipse-che/che-server#616
Closed

Support private raw URLs with ?token parameter on github.com #22685

ibuziuk opened this issue Nov 23, 2023 · 3 comments · Fixed by eclipse-che/che-server#616
Assignees
Labels
area/git/oauth-services OAuth support to authenticate developers with their GitHub, GitLab, Bitbucket etc...accounts kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.

Comments

@ibuziuk
Copy link
Member

ibuziuk commented Nov 23, 2023

Describe the bug

Starting workspaces based on private raw URL from github.com that point to devfile.yaml do not work
Screenshot 2023-11-23 at 13 46 20

Che version

7.77@latest

Steps to reproduce

  1. open workspaces.openshift.com
  2. get raw URL to devfile from a private github repositori
  3. try to start a workspace base on this URL
  4. ERROR: workspace can not be started - Cannot build factory with any of the provided parameters. Please check parameters correctness, and resend query.

Note that it fails with the same error with & without the token URL paramater

Expected behavior

Workspaces are started based on the private raw URLs to devfile from github.com

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

Dev Sandbox (workspaces.openshift.com)

Eclipse Che Logs

No response

Additional context

Public raw URLs like https://raw.githubusercontent.com/eclipse-che-demo-app/che-demo-app/main/devfile.yaml work just fine on Developer Sandbox / workspaces.openshift.com

@ibuziuk ibuziuk added kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. area/git/oauth-services OAuth support to authenticate developers with their GitHub, GitLab, Bitbucket etc...accounts labels Nov 23, 2023
@vinokurig
Copy link
Contributor

vinokurig commented Nov 23, 2023

@ibuziuk This is expected, if the url points to a PRIVATE repository, then che can not read the content, even if PAT or Oauth is configured. As a workaround, a GitHub PAT can be passed through the url: https://<che_fqdn>#https://<token>@raw.githubusercontent.com/che-samples/cpp-hello-world/main/devfile.yaml, see: https://eclipse.dev/che/docs/stable/end-user-guide/starting-a-workspace-from-a-raw-devfile-url/

@vinokurig
Copy link
Contributor

If taking into account the token query parameter that comes with the url e.g. https://raw.githubusercontent.com/vinokurig/private/main/devfile.yaml?token=<token> then it should work, so this is really a bug.

@ibuziuk
Copy link
Member Author

ibuziuk commented Nov 23, 2023

right, I belive the issue is about honoring ?token URL parameter

@ibuziuk ibuziuk changed the title Not possible to use private raw URLs that point to devfile.yaml from github.com Support private raw URLs with ?token parameter on github.com Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git/oauth-services OAuth support to authenticate developers with their GitHub, GitLab, Bitbucket etc...accounts kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants