Created: 2017.07.04
When attempting to clone a website, the SSH passphrase is requested and rejected three times.
Password Required.
This occurs with all of the following:
- SourceTree application - "Password Required. For user git on host bitbucket.org."
- Bitbucket SSH clone via SourceTree
git clone [email protected]:dotherightthing/repo.git
The error message varies depending on the application:
- SourceTree - invalid URL
- Bitbucket SSH clone via SourceTree - invalid URL
- Invalid passphrase
Bitbucket offers multiple levels of security:
- OAuth account access
- SSH
- Two Step Authentication
Connecting a Bitbucket account.
SourceTree > Preferences > Do The Right Thing > Edit > Connect Account
After clicking Connect Account and entering the 6 digit Authy number string, nothing happens. The button still reads ‘Connect Account’.
SSH keys are stored in the parent account, not in website repos:
# View rsa public key and the associated email address:
cat ~/.ssh/id_rsa.pub
# Copy rsa public key to clipboard
pbcopy < ~/.ssh/id_rsa.pub
https://bitbucket.org/account/user/dotherightthing/two-step-verification/manage
I use the Authy Android App to generate six digit pass codes on demand.
Keychain Access.
SSH Passphrase in Keychain Access.
MacOS > Search > Keychain Access
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
I found that I had no private key:
SSH Key added.
The solution for me was to generate a new SSH key. I’ve no idea why the last key was missing private key info, and why it worked for a while in spite of this. The only difference is that I am now logging in from a new IP address (Christchurch, July 2017).
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Passphrase: ...
eval "$(ssh-agent -s)"
Agent pid 12345
ssh-add -K ~/.ssh/id_rsa
Test that the correct SSH key is associated with your account.
ssh -T [email protected]
If you are prompted for your passphrase, enter it. It should be remembered for next time.
You should see something like:
logged in as username.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
ssh -T [email protected]
You should see something like:
Hi username! You've successfully authenticated, but GitHub does not provide shell access.









