From Source Tree, I get:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/master:refs/heads/master
Pushing to email@example.com:myusername/my-project.git
myusername@Bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.
But, if I copy that to the terminal, and it works fine.
I verified that ls ~/.ssh/id_rsa has the same key as found on bitbucket. And I've run
ssh-add ~/.ssh/id_rsa which says "Identity added"
I'm running OSX 10.13.4, Source Tree 2.7.3, BitBucket Media Adapter 1.0.6.
My SourceTree preferences / accounts are set to OAuth/SSH but I've tried Oauth/HTTPS, Basic/SSH, and Basic/HTTPS but I still get the same error.
It use to work. And one time after playing with it for an hour, I got it to work again. But, now SourceTree fails again and I did't do a thing.
With ssh, please check if the ssh-agent has your keys loaded. If not, please add them to the agent.
Run below commands in terminal to do so,
To check if keys are loaded:
To add keys to agent:
Key in the passphrase used while generating the ssh key and you should be good to go.
Sourcetree Mac Developer
I greatly appreciate your answer. But, I'm afraid I've tried that several times. I've followed every single help discussion I could find (dozens actually). I've literally spent over an hour trying that sort of thing. And I can't get it to work in Source Tree.
Here's the thing... when I run the exact same git command in a shell, it asks me:
Enter passphrase for key '/Users/myusername/.ssh/id_rsa'
But wait??? I've never given the passphrase to Source Tree! So I don't understand how it can even work! Why doesn't Source Tree ask me for a passphrase?
Or, perhaps I shouldn't be prompted for a passphrase from the shell command at all? Is this a symptom of the problem? Maybe Source Tree or the shell should know my passphrase already.
I love the Source Tree software. It's wonderful. If I could only fix the checkin part, then I wouldn't have to always run git from a shell.
Thank you again for attempting to help me.
The passphrase it is asking you is for the key you have entered while creating the ssh key. We are aware that this prompt in Sourcetree isn't properly worded to let the user know that its the passphrase for ssh key. We are working to improve this experience in upcoming releases.
If you don't remember this passphrase, you can create a new ssh key using Sourcetree and use that on the server.
Let me know if you need help with that.
A vulnerability has been published today in regards to Sourcetree for Windows. The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event