GitHub repository import failures in Bitbucket Data Center

Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article helps you troubleshoot and resolve issues where GitHub repository imports into Bitbucket Data Center fail or get stuck with below error , especially when using a proxy configuration:

Could not set SSL backend to 'schannel'

com.atlassian.bitbucket.scm.CommandFailedException: '<git command>' exited with code 128 saying: fatal: Could not set SSL backend to 'schannel': already set

Diagnosis

Please check the Bitbucket application logs <Bitbucket-Home>/logs for errors related to the import process.

Below are the Common errors:

1. Failed to connect to port 443: Connection timed out. This error indicates that the git process are unable to reach to Github server. Here is the sample error from the application logs:

Failed to connect to github.com port 443: Connection timed out

2025-11-17 12:33:08,027 ERROR [pool-7-thread-1] c.a.b.i.i.repository.RefSyncTask Failed to import repository:<repository-name> com.atlassian.bitbucket.scm.CommandFailedException: exited with code 128 saying: fatal: unable to access <github URL>': Failed to connect to github.com port 443: Connection timed out

2. Could not set SSL backend to schannel: already set. This error indicates Git configuration tries to set the SSL backend (schannel) when it’s already set. Here is the sample error from the application logs:

Could not set SSL backend to 'schannel'

com.atlassian.bitbucket.scm.CommandFailedException: '<git command>' exited with code 128 saying: fatal: Could not set SSL backend to 'schannel': already set

Cause

GitHub repository imports into Bitbucket can fail if the external git process used by Bitbucket is not configured to use the required forward proxy. Additionally, errors such as "Could not set SSL backend to schannel: already set" may occur if the https.sslBackend git configuration is redundantly set in multiple places (system, global, or repository level).

Solution

Please follow these steps to resolve issues with GitHub repository imports in Bitbucket Data Center for the errors mentioned above:

1. Ensure the git process uses the proxy:

Bitbucket's JVM proxy settings do not apply to the external git process. You must configure the proxy for git directly.

  • Log in to the Bitbucket server as the user running Bitbucket.

  • Set the proxy for git by running the following command, replacing mydomain.net and 8080 with your actual proxy address and port:

    Git config to use the proxy

    git config --global http.proxy http://proxymydomain.net:8080 git config --global https.proxy http://proxymydomain.net:8080
  • Alternatively, set the environment variables in the Bitbucket user profile:

    Set Proxy in Bitbucket user profile using env variables

    export http_proxy=http://proxymydomain.net:8080 export https_proxy=http://proxymydomain.net:8080

2. Check for redundant SSL backend configuration:

  • If you see the error "Could not set SSL backend to schannel: already set" in the application logs, check the git configuration for multiple https.sslBackend entries:

    • Run the following command as the Bitbucket user:

      git config list

      git config --list --show-origin | grep sslBackend
    • If https.sslBackend is set in multiple places (system, global, or repository), remove redundant entries. For example, to unset at the global level:

      git config unset https.sslBackend

      git config --global --unset https.sslBackend

    • Repeat the above step for other levels as needed (system or local) and unset the https.sslBackend if set in multiple places.

    • Once the above steps are completed and the git config issues are fixed, please re-import the repository from GitHub using Bitbucket's import feature.

The content of this article has been generated by AI
Updated on March 6, 2026

Still need help?

The Atlassian Community is here for you.