Repository navigation
feat: set the CI_SERVER_SHELL_SSH_HOST predefined variable - #1975
Merged
firecow merged 1 commit intoOct 24, 2026
Merged
Conversation
GitLab provides CI_SERVER_SHELL_SSH_HOST (the SSH host for Git access) next to CI_SERVER_SHELL_SSH_PORT, but gitlab-ci-local didn't define it, so scripts cloning with git@$CI_SERVER_SHELL_SSH_HOST failed. Default it to CI_SERVER_HOST; it can be overridden like the other CI_SERVER_* variables. Closes #1972
LaloRiojas
approved these changes
Oct 12, 2026
rarean
pushed a commit
to rarean/gitlab-ci-local
that referenced
this pull request
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1972.
GitLab defines
CI_SERVER_SHELL_SSH_HOST, the SSH host of the instance for Git access, next toCI_SERVER_SHELL_SSH_PORT. gitlab-ci-local only defined the port, so scripts that clone withgit@$CI_SERVER_SHELL_SSH_HOST:...got an empty host.CI_SERVER_SHELL_SSH_HOSTnow defaults toCI_SERVER_HOST, which is also GitLab's value unless a separate SSH host is configured. Like the otherCI_SERVER_*variables, it can be overridden with--variableor a variables file.Tests:
CI_SERVER_SHELL_SSH_HOST: "gitlab.com"to the expected variables intests/test-cases/predefined-variables/integration.test.ts. I couldn't run that suite locally: the shell executor needsrsync, which isn't available on my Windows machine, so I'm relying on CI for it.init()frompredefined-variables.tsdirectly, with an SSH remote ongitlab.example.com:2222:CI_SERVER_SHELL_SSH_HOST=gitlab.example.comCI_SERVER_HOST=gitlab.internal:CI_SERVER_SHELL_SSH_HOST=gitlab.internalCI_SERVER_SHELL_SSH_HOST=ssh.gitlab.example.com: that value, withCI_SERVER_HOSTunchangedeslintandtsc --noEmitare clean.Summary by cubic
Defines the
CI_SERVER_SHELL_SSH_HOSTpredefined variable so scripts that clone withgit@$CI_SERVER_SHELL_SSH_HOSTno longer get an empty host.CI_SERVER_HOST, matching GitLab's behavior unless a separate SSH host is configured, and can be overridden with--variableor a variables file.Closes #1972.
Written for commit d761277. Summary will update on new commits.