You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have installed Sourcetree and tried to push my local repo to my bitbucket repo.
I have configured SSH on my local system and added the SSH key to my bitbucket account as per the various documentation and KB articles I've read.
I have verified that the connection is working using ssh -T firstname.lastname@example.org
But when I try connect via SourceTree I get an error saying that the Agent is running but that connection was still refused.
I have converted my ssh key to a putty-compatible one and loaded into the Pageant key list.
When I try the verbose debugging (ssh -t -vvv email@example.com) in Git Bash I receive an error : "PTY allocation request failed on channel 0" which I have not been able to find a solution for the website.
I am unable to pull or push using SourceTree
Hi @Alon Welcome to Atlassian Community.
From the error displayed, the shell connect to the bitbucket is denied but you can run git commands.
Can you try git clone or push or pull command as below:-
git clone firstname.lastname@example.org:<account to connect bitbucket>/<any repository>
If the above does not work,
Please try to generate new SSH key and try (sometimes it works)
also check if you have installed any git bash client on source tree system to hit execute git commands.
Let me know further to help.
Hi @vikram ,
Thanx for getting back to me.
I've got git bash installed (Git Extensions) and I tried to view the remote for my repo - it listed it correctly.
To give you a bit of history - I created a local git repo as part of a migration from SVN to git, and now I want to push it to bitbucket.
I did the same thing for a few other repos and pushed them to github, but this I want to go to bitbucket.
When I tried to push my repo to the remote I got an error that there were changes in the remote that were not local - I had created the remote repo with a gitignore and readme.md file, and these were obviously the changes it was complaining about.
I tried to pull the changes but it complain about being unrelated to my local repo, so I ended up deleting the remote repo and re-creating it as an empty repo.
When I try pull new (empty) remote - I get an error: fatal: couldn't find remote ref HEAD
followed by $ fatal: the remote end hung up unexpectedly.
I then tried to push my local repo (all branches so I have complete history) to remote and it worked from git bash.
If I use the full syntax (as you specified above) - it works to pull and fetch, but when I try in SourceTree I got a permission denied (PublicKey) error.
I deleted the tab in SourceTree and cloned again from the repo - now it seems to be working.
Thanx for the guidance and suggestions - I've managed to get it hooked up and working now.