-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Study possible ways to get devfile content from private Bitbucket repository during factory resolving process #18226
Comments
Manual steps to make private repo clone or file access:
OAuth Token responce must be as follows:
or
|
So, since OAuth 2 flow is only available on BitBucket SAAS, we was forced to get back to OAuth 1 (Called Application Links on BitBibucket).
Add Che oAuth Info on next screen:
If necessary, enter login information and press "Allow" on request.
This will return the following content:
Content of the file can be returned. That can also be used for app tokens creation, SSH keys upload etc. (with corresponfing URL changes etc) |
At this moment we may suggest the following flow Prerequisites: Users should have one k8s namespace created. Flow:
apiVersion: v1
kind: Secret
metadata:
name: bitbucket-personal-access-token-secret
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: bitbucket-personal-access-token
annotations:
che.eclipse.org/expired-after: 12323423
che.eclipse.org/bitbucket-userid: 34593094509
che.eclipse.org/bitbucket-username: 'tshevchenko'
data:
token: ZHNhZmFkZmFzZGZxMzRyMzRyMTM0 4.2 Git credential secret apiVersion: v1
kind: Secret
metadata:
name: git-credentials-secret
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: workspace-secret
annotations:
che.eclipse.org/automount-workspace-secret: 'true'
che.eclipse.org/mount-path: /home/theia/.git-credentials
che.eclipse.org/mount-as: file
che.eclipse.org/git-credential: 'true'
che.eclipse.org/bitbucket-personal-access-token-secret: 'bitbucket-personal-access-token-secret'
data:
credentials: aHR0cHM6Ly91c2VyOnBhc3NAZXhhbXBsZS5jb20K
|
Is your task related to a problem? Please describe.
We would like to allow users to use private Bitbucket git repositories in factories.
Describe the solution you'd like
To enable that we need to somehow get the content of the file.
I see at least two directions
Describe alternatives you've considered
Store "app token" as a secret in k8s namespace.
Additional context
#17829
The text was updated successfully, but these errors were encountered: