Wednesday, December 2, 2026

Bitbucket SSH Migration: How to Update to ssh.bitbucket.org

 Starting November 12, 2026, Bitbucket is moving SSH traffic to ssh.bitbucket.org. Update your host configuration to prevent connection disruptions across local repositories, automation scripts, and network firewalls.

To migrate your SSH traffic to ssh.bitbucket.org, update your remote URLs, adjust automation pipelines, and allow the new host and key.

Method 1: Update Individual Repositories Manually

  1. Check your current remote URLs Open a terminal in your local repository directory and run:

    git remote -v
    
    

    Verification: Confirm that your fetch and push URLs point to git@bitbucket.org:....

  2. Update the remote URL Point the origin remote to ssh.bitbucket.org:

    git remote set-url origin git@ssh.bitbucket.org:<workspace>/<repository>.git

    Verification: Run git remote -v again and check that the URL starts with git@ssh.bitbucket.org:.

  3. Test the connection Run a fetch to verify access:

    git fetch

    Verification: On first connection, your terminal prompts you to accept the new SSH host key. Verify the fingerprint and enter yes.

Method 2: Global Alternative (Globally Rewrite URLs)

If you work across many local repositories, rewrite all bitbucket.org SSH URLs to ssh.bitbucket.org globally instead of editing each repo one by one:

git config --global url."git@ssh.bitbucket.org:".insteadOf "git@bitbucket.org:" git config --global url."ssh://git@ssh.bitbucket.org/".insteadOf "ssh://git@bitbucket.org/"

Verification: Run git config --global --get-all url."git@ssh.bitbucket.org:".insteadOf to confirm the rewrite rule is active.

Method 3: Update CI/CD Pipelines and Automation

For build servers, deployment scripts, and CI/CD runners using SSH with Bitbucket:

  • Search configuration files, environment variables, and deployment manifests for git@bitbucket.org: or ssh://git@bitbucket.org.

  • Replace those host references with ssh.bitbucket.org.

  • Pre-seed ~/.ssh/known_hosts in automated environments with:

    curl -s https://bitbucket.org/site/ssh | sed 's/bitbucket.org/ssh.bitbucket.org/' >> ~/.ssh/known_hosts
    

Method 4: Update Network Firewalls

If your corporate network or deployment infrastructure restricts outbound SSH traffic with firewall allowlists, allow outbound traffic to ssh.bitbucket.org on port 22.


Cheers,

Samitha

No comments:

Post a Comment