Code Climate lost connection to my repository
Code Climate requires a direct line of communication, as well as the appropriate permissions, to access your repository. If Code Climate loses access, a message will appear on your Dashboard. The majority of the time, this problem can be quickly resolved by following the troubleshooting steps below.

Note: You must be in an organization's Owners group to perform the actions described in this article.
Note: If you added your repository to Code Climate by clicking Add Open Source Repo, the troubleshooting steps below do not apply. For these repositories, we're here to help!
Troubleshooting Step #1: Check the SSH Key
An SSH key grants Code Climate access to pull down your repository onto our secure server so we can analyze your codebase. If our SSH key is removed, we will lose access to the repository.
To confirm the SSH key is valid, follow the steps below:
- From your Dashboard, mouse over the repository's name and click Repo Settings.
- On the GitHub tab, confirm that the SSH key on this page is installed on GitHub (listed in GitHub under Deploy Keys). A list of existing keys can be found at the following URL: https://github.com/org-name/repo-name/settings/keys. If the key listed as the "SSH key" in Code Climate does not exist on your "Deploy Keys" page in GitHub, continue on to the next step.

Tip: Wondering what the "fingerprint" is? For some hosted Git services, once an SSH key is added to a repository, you can no longer see the entire public key via the user interface. Instead, only a fingerprint of the key is displayed. In these situations, use the fingerprint (instead of the full key) to confirm that the key is installed.
- If necessary, install our SSH key. The installation process differs based on where your repository is hosted:
- For DIY Git servers: Install the key into your Git server's "authorized keys" file (e.g., ~/.ssh/authorized_keys).
- For hosted Git services (e.g., Bitbucket, GitLab, Beanstalk): The installation process usually involves copying/pasting the full public key into a text box within your repository's "settings" menu. The following are links to various SSH key installation help files: GitHub, Bitbucket, GitLab, Beanstalk. When reading these articles, skip any steps involving key generation (since your key is already generated). Also, note that for many Git services (including GitHub), you'll specifically be dealing with deploy keys, which are SSH keys attached directly to the repository instead of a personal user account.
Important: To validate if your changes resolved the issue, look for the "we've lost connection" error message to disappear. In addition, you should also check if the SHA displayed in Code Climate matches the SHA for your most recent commit. If the two do not match, push a new commit to your default branch and then click the "refresh" button on the Feed page. If the two still do not match after the refresh, continue to the troubleshooting steps below or contact us.
Troubleshooting Step #2: Check the URI
If any element of your repository's URI changes (e.g., repository name, GitHub organization/user name, domain name, Git server name), Code Climate will lose access to the repository.
To verify/correct this problem:
- From your Dashboard, mouse over the repository's name and click Settings.

- On the Repo Info tab, review the URI. If it is incorrect, update it and click Save.

Important: To validate if your changes resolved the issue, look for the "we've lost connection" error message to disappear. In addition, you should also check if the SHA displayed in Code Climate matches the SHA for your most recent commit. If the two do not match, push a new commit to your default branch and then click the "refresh" button on the Feed page. If the two still do not match after the refresh, continue to the troubleshooting steps below or contact us.
Important: To validate if your changes resolved the issue, click the "refresh" button on the Feed page. After doing so, wait for a few minutes and then manually reload the Feed page. If the problem has been resolved, the "we've lost connection" message at the top of the Feed page will disappear. If it does not, contact us.
Updated about 3 years ago