-
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
Improving git configuration with PAT documentation #21989
Comments
@l0rd, I'd like to work on this as a technical writer to collaborate (ideally from the very beginning) with the developer who gets assigned to work on this issue. I'd be grateful if the developer can reach out to me on Slack to |
I couldn't agree more! I have spent more than a couple hours trying to get it to work with Github Enterprise (https://github.ibm.com). I am stuck. I have tried to follow the hints in your opening post above but trying to make it work for Github Enterprise. And in the RedHat documentation But, have been unable to get it to work. When I try to create a new workspace, by specifying the URL of the Gir repo containing my devfile, I get the error indicating the devfile does not contain a valid apiVersion or schemaVersion. Do you have any guidance/instructions to setting up Git provider access token secret for Github Enterprise? |
Feedback from a concerned user:
|
A very similar discussion happened #21291 for GitLab tokens that expire every 2 hours. Currently tokens get refreshed when the workspace is restarted but there is no mechanism to refresh the token if the workspace is running for more than 2 hours. But I agree with the user: considered their high rotation frequency, those tokens are not supposed to be used in a development environment and we should look at the alternative (using an SSH key) instead.
It's possible to use an SSH key to clone the workspaces (instructions to add SSH Keys in a workspace) but that currently works only for public repositories. This is something that we want to address though and this is the issue to track. |
@RickJWagner I didn't find something related in the Che/DS documentation but it should be possible by following SSH flow - https://github.com/devfile/devworkspace-operator/blob/main/docs/additional-configuration.adoc#configuring-devworkspaces-to-use-ssh-keys-for-git-operations |
docs related changes are going to be provided by eclipse-che/che-docs#2567 |
The corresponding docs issue is RHDEVDOCS-4976. |
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
/remove-lifecycle stale |
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
@svor, just fyi, I removed myself as the assignee on the technical writing side because I no longer work on this project. |
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
Is your enhancement related to a problem? Please describe
Making PAT work at first try is hard, that's the recurrent feedback we get from customers. I have tried to configure it for BitBucket following the documentation and spent a couple of hours to make it work.
Describe the solution you'd like
che.eclipse.org/scm-userid
) is not straightforward. That's because using the curl command that is linked in the documentation fails with non-authorized. A link to the authentication for BB API should be added too.che.eclipse.org/scm-userid: 2
because BB user id is an integer. But the secret failed to be parsed because a string is expected. We should document that thescm-userid
should be wrapped with""
or''
.java.lang.IllegalArgumentException: invalid header value:...
). That was a mistake on my side but che-server should be more robust and trim blank chars at the beginning and at the end of the token string.https://{bb-host}/users/{user-slug}/repos/{repo-name}/
didn't work buthttps://{bb-host}/scm/~{user-slug}/{repo-name}.git
. We should support both BB URL schemas.project-clone
fails to git clone the repository. We should mention that PAT and git-credentials should be used together and we should document how to do that.admin guide -> configuring dev spaces -> configuring workspaces globally -> git with self-signed certificates
...)gitTrustedCertsConfigMapName
inCheCluster
is redudant: we should just use labels/annotations to automatically inject the config map.githost
the protocol (i.e.https
) is requiredingress operator
or*.apps
?)Additional information
For reference this is the PAT secret that I had to use to make it work (I had to add
controller.devfile.io/*
labels/annotations +credentials
indata
) :The text was updated successfully, but these errors were encountered: