How can I Make Use of Custom Scheme for URI Links?

I am very impressed by Sourcetree's ability to seemingly create its own custom URI scheme of "sourcetree://clonerepo..." and I was wondering if there was a way for me to make use of that feature in my own applications.

I recreated the link in both Firefox and Chrome and realized that there was no javascript used to cause a local instance of Sourcetree to open. However, when I tried to make my own scheme, it, naturally, was unrecognized. This led me to believe that during the installation of Sourcetree, there must have been some method that added the "sourcetree://" scheme to a whitelist of sorts in Chrome and Firefox to allow it to function as it does.

If anyone could point me in the right direction on this, I will be very grateful!


1 answer

1 accepted

2 votes
Accepted answer
Timothy Chin Community Champion Jun 11, 2014

By right, one would be creating a custom uri for an application ( as defined here. As long as the client has this in it's registry (e.g. HKEY_CLASSES_ROOT\sourcetree\shell\open\command), the client machine should recognize "sourcetree://".

Not sure what you are trying to do.

This is perfect! Thank you very much! It was very rewarding to be able to create my own scheme.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,106 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you