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

Issues connecting via SourceTree

Alon December 31, 2022

Hi,

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 git@bitbucket.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 git@bitbucket.org) 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

Error.png

debug.pngtest.png

Thanx,

Alon

 

2 answers

1 accepted

0 votes
Answer accepted
vikram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2023

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 git@bitbucket.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.

 Vikram P

Alon January 24, 2023

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.

 

Cheers,

Alon

Like vikram likes this
vikram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2023

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

Vikram P

0 votes
Alon January 9, 2023

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
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events