Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

"Create Pull Request" from SourceTree forms the wrong URL and duplicates path parts

Ian Carrick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 19, 2018

I can create a pull request to my repository (let's call it myrepo) from BitBucket and it goes to this URL and works fine:


https://bitbucket.org/my_company/my_repo/pull-requests/new?source=my_company/my_repo%3A%3Afeature/my_feature_branch

From within SourceTree using the same repository I go to create  a pull request and it jumps to this URL in the browser and displays"That link has no power here":

https://bitbucket.org/my_company/my_repo/my_company/my_repo/pull-request/new?source=my_company/my_repo:70dec24473f5:feature%2fmy_feature_branch

So notice that my_company/my_repo appears twice and also pull-requests is used instead of pull_request (notice the extra 's').

It looks to me like the SourceTree URL is very different and thus will not work. 

In the repository settings in SourceTree, all looks fine:
URL/Path is git@bitbucket.org:my_company/my_repo.git
Host Type is BitBucket
Host Root URL is https://bitbucket.org/my_company/my_repo

SourceTree Version 2.6.6.0

3 answers

2 votes
Dele Taylor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 22, 2018

I had a similar issue.  SourceTree was creating pull requests to the old repo's URL after we had migrated to a new account. 

This is what worked for me:

  1. Close SourceTree
  2. Edit .git/sourcetreeconfig.json in repo's folder
  3. Update the RemoteProjectLinks[0].Identifier field to the new repo
  4. Save file and start SourceTree

Hope this helps.

Karl M Kovaciny
Contributor
August 23, 2018

Works great for the domain name, but when my "Identifier" is "projects/myProject" it takes me to 

http://xxx.net/projects/myProject/repos/myRepo/pull-request/new?source=projects/CVS:be43e1564ffc:beforeme

instead of 

http://xxx.net/projects/myProject/repos/myRepo/pull-requests?create

and I can't get that working. Still, nice find.

0 votes
SteveFletcher52 August 23, 2018

Not sure if this was primary fix, but it started working for me after doing this.  After refresh in settings, pull request opened correctly in Chrome.  SourceTree version 2.5.5.0

Link provided.

Samuel Rule Aug 16, 2017

I had this error appear randomly when it had been working for me before.

Here is the solution that worked for me:

On the settings page just remove the current remote that is there and then add the exact same one again. This must have refreshed it / woke it up and now I have no problems.

https://community.atlassian.com/t5/Bitbucket-questions/SourceTree-how-do-i-fix-this-error-when-submitting-a-pull/qaq-p/301417

0 votes
SteveFletcher52 July 21, 2018

I have same issue; although I do not have duplicate company and repo.

mine is https://bitbucket.org//projects/My_Company/repos/MyRepo/pull-requests?create&sourceBranch=feature%2ftest_2

Browser reports "That link has no power here".  tried Chrome and Firefox browsers.  I can create the pull request if I go to bitbucket.org, but can not do it from SourceTree.

Answers?

Thanks!

Dave Sanderling
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 18, 2018

I had the same issue. Notice you have two slashes after bitbucket.org in the url. If you close SourceTree, open up .git/sourcetreeconfig.json (in your repo folder), and take the trailing slash off the BaseUrl, save file and reopen ST, you should be good to go.

Mine had  "BaseUrl": "https://bitbucket.org/"

I changed it to  "BaseUrl": "https://bitbucket.org"

Good luck!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events