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

fix: improve git PAT configuration documentation #2567

Merged
merged 9 commits into from
Apr 4, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ $ {orch-cli} create configmap che-git-self-signed-cert \
+
[NOTE]
====
* In the `githost` field, the protocol `https://` is required.
* When `githost` is not specified, the given certificate is used for all HTTPS repositories.
* Certificate files are typically stored as Base64 ASCII files, such as. `.pem`, `.crt`, `.ca-bundle`. Also, they can be encoded as binary data, for example, `.cer`. All `Secrets` that hold certificate files should use the Base64 ASCII certificate rather than the binary data certificate.
* Certificate files are typically stored as Base64 ASCII files, such as. `.pem`, `.crt`, `.ca-bundle`. All `ConfigMaps` that hold certificate files should use the Base64 ASCII certificate rather than the binary data certificate.
* The certificate chain of trust is required. If the `ca.crt` is signed by a certificate authority (CA), the CA certificate must be included in the `ca.crt` file.
====

. Add the required labels to the ConfigMap:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ With GitHub and GitLab, you can even use the URL of a specific branch of the rep
* `pass:c,a,q[{prod-url}#https://github.com/__<user_or_org>__/__<repository>__]` starts a new workspace with a clone of the default branch.
* `pass:c,a,q[{prod-url}#https://github.com/__<user_or_org>__/__<repository>__/tree/__<branch_name>__]` starts a new workspace with a clone of the specified branch.
* `pass:c,a,q[{prod-url}#https://github.com/__<user_or_org>__/__<repository>__/pull/__<pull_request_id>__]` starts a new workspace with a clone of the branch of the pull request.
====
+
.The URL syntax for starting a new workspace with a clone of a BitBucket Server repository
====

* `pass:c,a,q[{prod-url}#https://<bb-host>/scm/<project-key>/<repository_name>.git]` starts a new workspace with a clone of the default branch.
* `pass:c,a,q[{prod-url}#https://<bb-host>/users/<user-slug>/repos/<repo-name>/]` starts a new workspace with a clone of the default branch, if a repository was created under the user profile.
* `pass:c,a,q[{prod-url}#https://<bb-host>/users/<user-slug>/repos/<repo-name>/browse?at=refs%2Fheads%2F<branch-name>]` starts a new workspace with a clone of the specified branch.

====
+
After you enter the URL to start a new workspace in a browser tab, it renders the workspace-starting page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ If you have the link:https://www.gnu.org/software/coreutils/base64[base64] comma
+
* GitHub: link:https://docs.github.com/en/rest/users/users#get-a-user[Get a user]. See the `id` value in the response.
* GitLab: link:https://docs.gitlab.com/ee/api/users.html#for-normal-users[List users: For normal users], use the `username` filter: `/users?username=:username`. See the `id` value in the response.
* Bitbucket Server: link:https://developer.atlassian.com/server/bitbucket/rest/v802/api-group-api/#api-api-latest-users-userslug-get[Get users]. See the `id` value in the response.
* Bitbucket Server: use the `curl` command: `curl -D- -u username:password -X GET -H "Content-Type: application/json" https://{baseurl}/rest/api/latest/users/{userSlug}` and see the `id` value in the response. More information could be found in the link:https://developer.atlassian.com/server/bitbucket/rest/v802/api-group-api/#api-api-latest-users-userslug-get[Get users BitBucket documentation] and the link:https://developer.atlassian.com/server/bitbucket/how-tos/example-basic-authentication/[authentication for BitBucket API].
max-cx marked this conversation as resolved.
Show resolved Hide resolved
svor marked this conversation as resolved.
Show resolved Hide resolved

. Prepare a new {orch-name} Secret.
+
Expand Down Expand Up @@ -87,7 +87,7 @@ type: Opaque
<1> Your {prod-short} user ID.
<2> The Git provider name: `github` or `gitlab` or `bitbucket-server` or `azure-devops`.
<3> The Git provider URL.
<4> Your Git provider user ID.
<4> Your Git provider user ID, the value should be wrapped with ' ' or " ".
svor marked this conversation as resolved.
Show resolved Hide resolved
<5> This line is only applicable to `azure-devops`: your Git provider user organization.

. Visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`.
Expand Down Expand Up @@ -126,3 +126,6 @@ EOF
. xref:starting-a-new-workspace-with-a-clone-of-a-git-repository.adoc[Start a new workspace by using the URL of a remote Git repository] that the Git provider hosts.
. Make some changes and push to the remote Git repository from the workspace.

.Additional resources

* xref:administration-guide:deploying-che-with-support-for-git-repositories-with-self-signed-certificates.adoc[Deploying Che with support for Git repositories with self-signed certificates]