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 PATs in GitHub Enterprise server #603

Merged
merged 7 commits into from
Nov 21, 2023
Merged

Add support for PATs in GitHub Enterprise server #603

merged 7 commits into from
Nov 21, 2023

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Nov 7, 2023

What does this PR do?

Add necessary checks to the GithubURLParser and AbstractGithubURLParser classes in order to support PAT for GitHub Enterprise server without configuring oAuth.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

fixes eclipse-che/che#22582

How to test this PR?

  1. Deploy che with the PR image: quay.io/eclipse/che-server:pr-603
  2. Create a personal access token in the GitHub Enterprise server instance.
  3. Add the token to che through the dashboard user preferences page.
  4. Create a workspace from a private repository with a devfile from the GitHub server instance.

see: the workspace starts and the project is cloned.

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@vinokurig
Copy link
Contributor Author

/retest

@vinokurig vinokurig force-pushed the che-22582 branch 3 times, most recently from 01b285c to 3f9c0a5 Compare November 8, 2023 07:31
@ibuziuk ibuziuk requested a review from dkwon17 November 8, 2023 13:11
Copy link
Contributor

@dkwon17 dkwon17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

I was able to clone a private Github enterprise project with the PAT:

Screenshots

image

Screenshot_13 Screenshot_14

@openshift-ci openshift-ci bot added the lgtm label Nov 8, 2023
@vinokurig vinokurig requested a review from amisevsk as a code owner November 11, 2023 12:01
@openshift-ci openshift-ci bot removed the lgtm label Nov 11, 2023
@vinokurig vinokurig force-pushed the che-22582 branch 6 times, most recently from aaa79e5 to f9aa72b Compare November 12, 2023 10:14
@vinokurig
Copy link
Contributor Author

/retest

@vinokurig vinokurig force-pushed the che-22582 branch 2 times, most recently from 4988da6 to b572f31 Compare November 15, 2023 13:19
@artaleks9
Copy link
Contributor

/test v12-gitea-no-pat-oauth-flow

@vinokurig vinokurig merged commit 974c1b1 into main Nov 21, 2023
@vinokurig vinokurig deleted the che-22582 branch November 21, 2023 09:11
@devstudio-release
Copy link

Build 3.11 :: server_3.x/283: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.11 :: server_3.x/283: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/5334 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.11 :: copyIIBsToQuay/2175: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.11 :: sync-to-downstream_3.x/5335: SUCCESS

Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/5197 triggered; /job/DS_CI/job/dsc_3.x triggered;

@devstudio-release
Copy link

Build 3.11 :: operator-bundle_3.x/2305: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/5335 triggered

@devstudio-release
Copy link

Build 3.11 :: dsc_3.x/1571: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.11 :: update-digests_3.x/4964: SUCCESS

Detected new images: rebuild operator-bundle
* server; /DS_CI/operator-bundle_3.x/2305 triggered

@devstudio-release
Copy link

Build 3.11 :: copyIIBsToQuay/2175: SUCCESS

3.11
arches = x86_64, s390x, ppc64le;
  * LATEST DS OPERATOR BUNDLE = <a href=https://quay.io/repository/devspaces/devspaces-operator-bundle?tab=tags>registry-proxy.engineering.redhat.com/rh-osbs/devspaces-operator-bundle:3.11-80
  * LATEST DWO OPERATOR BUNDLE = <a href=https://quay.io/repository/devworkspace/devworkspace-operator-bundle?tab=tags>registry-proxy.engineering.redhat.com/rh-osbs/devworkspace-operator-bundle:0.21-7
+ s390x-rhel8 IIB(s) copied:
  + quay.io/devspaces/iib:3.11-v4.14-625398-533291-s390x
  + quay.io/devspaces/iib:3.11-v4.14-s390x
  + quay.io/devspaces/iib:next-v4.14-s390x
  + quay.io/devspaces/iib:3.11-v4.13-625580-533286-s390x
  + quay.io/devspaces/iib:3.11-v4.13-s390x
  + quay.io/devspaces/iib:next-v4.13-s390x
  + quay.io/devspaces/iib:3.11-v4.12-625566-533281-s390x
  + quay.io/devspaces/iib:3.11-v4.12-s390x
  + quay.io/devspaces/iib:next-v4.12-s390x
  + quay.io/devspaces/iib:3.11-v4.11-625551-533277-s390x
  + quay.io/devspaces/iib:3.11-v4.11-s390x
  + quay.io/devspaces/iib:next-v4.11-s390x
+ x86_64-rhel8 IIB(s) copied:
  + quay.io/devspaces/iib:3.11-v4.14-625398-533291-x86_64
  + quay.io/devspaces/iib:3.11-v4.14-x86_64
  + quay.io/devspaces/iib:next-v4.14-x86_64
  + quay.io/devspaces/iib:3.11-v4.13-625580-533286-x86_64
  + quay.io/devspaces/iib:3.11-v4.13-x86_64
  + quay.io/devspaces/iib:next-v4.13-x86_64
  + quay.io/devspaces/iib:3.11-v4.12-625566-533281-x86_64
  + quay.io/devspaces/iib:3.11-v4.12-x86_64
  + quay.io/devspaces/iib:next-v4.12-x86_64
  + quay.io/devspaces/iib:3.11-v4.11-625551-533277-x86_64
  + quay.io/devspaces/iib:3.11-v4.11-x86_64
  + quay.io/devspaces/iib:next-v4.11-x86_64
+ ppc64le-rhel8 IIB(s) copied:
  + quay.io/devspaces/iib:3.11-v4.14-625398-533291-ppc64le
  + quay.io/devspaces/iib:3.11-v4.14-ppc64le
  + quay.io/devspaces/iib:next-v4.14-ppc64le
  + quay.io/devspaces/iib:3.11-v4.13-625580-533286-ppc64le
  + quay.io/devspaces/iib:3.11-v4.13-ppc64le
  + quay.io/devspaces/iib:next-v4.13-ppc64le
  + quay.io/devspaces/iib:3.11-v4.12-625566-533281-ppc64le
  + quay.io/devspaces/iib:3.11-v4.12-ppc64le
  + quay.io/devspaces/iib:next-v4.12-ppc64le
  + quay.io/devspaces/iib:3.11-v4.11-625551-533277-ppc64le
  + quay.io/devspaces/iib:3.11-v4.11-ppc64le
  + quay.io/devspaces/iib:next-v4.11-ppc64le

@devstudio-release
Copy link

Build 3.11 :: server_3.x/284: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.11 :: server_3.x/284: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/5389 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.11 :: update-digests_3.x/5020: UNSTABLE

No new images detected: nothing to do!

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.

Add support for PATs in GitHub Enterprise server
6 participants