Repository navigation
EPMDEDP-17500: fix: Use ssh.bitbucket.org for Bitbucket Cloud SSH connections - #330
Merged
Merged
Conversation
…nections Bitbucket Cloud refuses SSH on bitbucket.org from 2026-11-12 (brownouts) and fully after 2026-12-10. HTTPS stays on bitbucket.org. - SSH repository URLs and the GitServer SSH check use ssh.bitbucket.org for gitProvider bitbucket with gitHost bitbucket.org. HTTPS URLs and web links keep gitHost. - Ship ssh.bitbucket.org host keys in the ssh-known-hosts ConfigMap. Keep bitbucket.org keys. - Self-hosted Bitbucket hosts are unchanged. Signed-off-by: Sergiy Kulanov <sergiy_kulanov@epam.com>
Collaborator
Pipeline
|
| Status | Task | Duration |
|---|---|---|
| ✓ Passed | github-set-pending-status | 5s |
| ✗ Failed | fetch-repository | 11s |
| ✓ Passed | github-report-pipeline-status | 5s |
Pushing new commits re-runs this pipeline automatically.
To re-run it without new commits, comment/recheck.
✗ fetch-repository / clone — exit code 1, last 100 log lines
+ '[' false '=' true ]
+ '[' true '=' true ]
+ cp -R /workspace/ssh-directory /tekton/home/.ssh
+ chmod 700 /tekton/home/.ssh
+ echo
+ chmod -R 400 /tekton/home/.ssh/id_rsa /tekton/home/.ssh/secretString /tekton/home/.ssh/token
+ '[' false '=' true ]
+ CHECKOUT_DIR=/workspace/output/source
+ '[' true '=' true ]
+ cleandir
+ '[' -d /workspace/output/source ]
+ test -z
+ test -z
+ test -z
+ /ko-app/git-init '-url=git@github.com:epam/edp-codebase-operator.git' '-revision=EPMDEDP-17500-bitbucket-ssh-host' '-refspec=' '-path=/workspace/output/source' '-sslVerify=true' '-submodules=true' '-depth=2' '-sparseCheckoutDirectories='
{"level":"warn","ts":1793891399.1166112,"caller":"git/git.go:278","msg":"URL(\"git@github.com:epam/edp-codebase-operator.git\") appears to need SSH authentication but no SSH credentials have been provided"}
{"level":"error","ts":1793891400.245647,"caller":"git/git.go:55","msg":"Error running git [fetch --recurse-submodules=yes --depth=2 origin --update-head-ok --force EPMDEDP-17500-bitbucket-ssh-host]: exit status 128\nWarning: Permanently added 'github.com,140.82.121.3' (ECDSA) to the list of known hosts.\r\nfatal: couldn't find remote ref EPMDEDP-17500-bitbucket-ssh-host\n","stacktrace":"github.com/tektoncd/pipeline/pkg/git.run\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:55\ngithub.com/tektoncd/pipeline/pkg/git.Fetch\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:150\nmain.main\n\tgithub.com/tektoncd/pipeline/cmd/git-init/main.go:53\nruntime.main\n\truntime/proc.go:225"}
{"level":"fatal","ts":1793891400.2457044,"caller":"git-init/main.go:54","msg":"Error fetching git repository: failed to fetch [EPMDEDP-17500-bitbucket-ssh-host]: exit status 128","stacktrace":"main.main\n\tgithub.com/tektoncd/pipeline/cmd/git-init/main.go:54\nruntime.main\n\truntime/proc.go:225"}
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.
Summary
Bitbucket Cloud refuses SSH on
bitbucket.orgfrom 2026-11-12 (brownouts) and fully after 2026-12-10. HTTPS stays onbitbucket.org. Host keys do not change. Jira: EPMDEDP-17500.GitServer.spec.gitHoststaysbitbucket.org. The operator maps the host for SSH only:ssh-known-hosts ConfigMap (includeDefaultProviders: true) bitbucket.org ecdsa | ed25519 | rsa + ssh.bitbucket.org ecdsa | ed25519 | rsa # same keys, https://bitbucket.org/site/sshCRD field text, chart README,
values.yamlanddocs/ssh-known-hosts.mdlistssh.bitbucket.org.Evidence
GetSSHUrl(bitbucket, bitbucket.org, "workspace/repo")→git@bitbucket.org:workspace/repo.gitAfter: →
git@ssh.bitbucket.org:workspace/repo.git(TestGetSSHUrl)TestSSHHost:bitbucket.organdBitBucket.orgmap;ssh.bitbucket.org,bitbucket.example.comandgithub+bitbucket.orgstay unchanged.Test_extractSshData_bitbucketCloudUsesSSHHost: connection check dialsssh.bitbucket.org.make lint: 0 issues.go test ./...: pass, exceptpkg/webhook(needs envtest; fails on the base branch too).Merge Danger
Door: two-way
Revert restores the
bitbucket.orgSSH host. No CR or stored data changes.Blast Radius: Bitbucket Cloud SSH
GitServers with
gitProvider: bitbucketandgitHost: bitbucket.orgconnect tossh.bitbucket.org:22after rollout. Requires outbound TCP 22 tossh.bitbucket.org. Installations withknownHosts.includeDefaultProviders: falsemust addssh.bitbucket.orgtoknownHosts.entries, or the GitServer reportsconnected: false. Self-hosted Bitbucket, GitHub, GitLab and Gerrit: no change.