Then, continue using the ssh-add command to add your keys. To start the agent, run the following: macOS/Linux Most likely your ssh-agent did not start properly. You may see this error when trying to use the ssh-add command. Could not open a connection to your authentication agent If you don't see your SSH key, click Add Key. If you don't see your key listed, add it by entering ssh-add followed by the path to the private key file:ĭouble-click the Pageant (PuTTY Authentication Agent) icon in your system tray to open the Pageant Key List dialog. To find out what keys your SSH agent is currently offering and to add them to the agent: You may run into this issue if you've recently restarted your system. If your SSH agent doesn't know to offer Bitbucket a key, the connection fails. Your key isn't loaded into your SSH agent
If you don't have any keys listed, you can follow our Set up an SSH key documentation to set one up. The SSH keys page shows a list of any existing keys.
To check if your public key is loaded into Bitbucket, do the following:įrom Bitbucket, choose Personal settings from your avatar in the lower left. Your public key isn't loaded into Bitbucket You shouldn't use sudo when cloning, pushing, or pulling because the ssh-agent runs on the user level, not the root level. You used sudo when attempting the connection Here are the most common reasons why you may see these messages: When attempting to clone, push, or pull over SSH with Git, you may receive one of these messages if Bitbucket couldn't authenticate with the keys that your SSH agent offered.
You may see the following error messages when trying to authenticate over SSH. From a repository in Sourcetree, you can find the command line by clicking Terminal in the top right. However, you may need to using the command line for others. If you're using Sourcetree, some of these solutions come with Sourcetree steps. If you're having problems with SSH, here are some things you can try when troubleshooting your issues.