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!

Thanks!

1 answer

1 accepted

This widget could not be displayed.
Timothy Chin Community Champion Jun 11, 2014

By right, one would be creating a custom uri for an application (http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx) 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 May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

861 views 2 3
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