Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Issues connecting via SourceTree



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

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 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






2 answers

1 accepted

0 votes
Answer accepted

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<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.

 Vikram P

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 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.




Like vikram likes this

@Alon I am feeling very happy, as it worked by all your efforts.

Vikram P

So far, 107 people have viewed this post and not a single suggestion or recommendation to try resolve the problem.

Does anyone have any suggestions or should I simply delete my account and use Github instead?

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events