Repository navigation
Description
Describe the bug
After the destination check added in Che 7.123 (eclipse-che/che-server#1061), creating a workspace from a Git repository that contains a devfile ignores that devfile when the Git server is not publicly routable. The server detects the repository but never contacts it, then creates a workspace from the default devfile: a generated name, the standard container, and only the cloned repository.
This affects an internal GitHub Enterprise, GitLab, or Bitbucket Server. A public GitHub repository is unaffected, because its addresses are publicly routable. The same devfiles still work on Che versions before 7.123.
The server log is:
Not contacting https://github.example.internal: it does not point to a publicly routable host.
UrlTargetValidator rejects the host before devfile discovery runs. Configuring a personal access token skips that probe, but the later devfile download still goes through the same check, so the devfile is still not applied. Turning URL_DESTINATION_CHECK off restores the old behavior and also disables every other private-address check.
Che version
7.123
Reproduced on Dev Spaces 3.31.1, che-server 7.123.1. The same check is still present on current main (7.125.0-SNAPSHOT). 7.124 does not change UrlTargetValidator or the devfile fetch path.
Steps to reproduce
- Install Eclipse Che or Dev Spaces 3.31 or later on OpenShift with the operator. Leave
URL_DESTINATION_CHECKunset so the destination check stays on. - Do not configure a Git provider endpoint for the internal server.
- Create a workspace from a Git repository on an internal host, such as
https://github.example.internal/org/repo, that contains adevfile.yaml. - See the warning above in the che-server log.
- Open the workspace. Its name is generated and its components are the default universal developer image, not the components from the repository devfile.
Expected behavior
The repository devfile is fetched and applied. The workspace name and components come from that devfile.
An administrator should be able to name the internal Git hostname without turning the destination check off. Literal private addresses, the cloud metadata service, and every hostname that was not listed should stay rejected.
Runtime
- OpenShift
Screenshots
No user interface change. The workspace looks the same as one created from a repository that has no devfile.
Installation method
- OperatorHub
Environment
- other (please specify in additional context)
Eclipse Che Logs
[WARN] [.f.s.g.AbstractGithubURLParser] - Not contacting https://github.example.internal: it does not point to a publicly routable host.
The same warning is logged by the GitLab and Bitbucket Server URL parsers.
Additional context
Reproduced on OpenShift 4.22 with the Dev Spaces operator installed from OperatorHub into openshift-operators, CheCluster in openshift-devspaces.
A public GitHub repository that contains a devfile is applied correctly on the same installation. The failure is limited to a Git host that resolves to a non-public address.
Pull request: eclipse-che/che-server#1093
That change adds URL_DESTINATION_TRUSTED_HOSTS and trusts configured Git provider endpoints, including raw.<host> for GitHub Enterprise. Set the variable on the che-server container. spec.components.cheServer.extraProperties does not set process environment variables, so it does not change this check.
Activity