Why does Bitbucket put a username in their HTTPS clone URLs?

The username in the HTTPS clone url causes problems with some software. Some users don't know to remove it.

Why not make the clone URLs more like GitHub and remove the username?

1 answer

0 vote
Chris Fuller Atlassian Team Feb 08, 2015

I don't work on Bitbucket, so I'm just guessing here...

The difference seems to be the interpretation of why you are copying the URL.  If you are copying it for yourself, then including the username is helpful because it saves you having to type it every time.  If there are programs that do not correctly handle a username in the URL, that really sounds like a bug in that software, not something wrong with what Bitbucket is doing.  If you are copying it to share with other people, then the username is not as helpful.

Given that pushing with HTTPS instead of SSH should be limited to users that have no other choice (firewall rules and the like), it might make sense to presume that HTTPS links will be for sharing rather than for actually cloning.  Then again, it might not.  It's hard to keep everyone happy. smile

Why not open an improvement request and see what they say?

Edit: Actually, it looks like this has already been discussed:

  • BB-2887 - Remove username from public repo https clone URLs
  • BB-7769 - Private wiki clone URL is missing username

 

Got it - thanks for the info, but I can't get to those links at all and there doesn't seem to be a signup for any of them.

Thank you Chris, I will do that.

The bug that I mentioned is not so much a technical bug as it's a workflow problem. Most git clients that I've tried just add the exact URL given as a remote. That's not really a problem in itself, but it becomes one when multiple users (or even multiple processes) share the same local repository for whatever reason. In my case, I always have to remove the username from the URL.

The other reason of course is that Github doesn't do it. They show the HTTPS url by default.

Regarding the notion that pushing with HTTPS instead of SSH should be limited - I'm not sure of that. According to git-scm.com, "It has probably become the most popular way to use Git now". I pretty much only use Git via HTTPS because it's just simpler on Windows. Even on Linux (which I use often), it seems like every how-to-build Xyz software article uses HTTPS urls in their instructions. There might be a technical reason why SSL should be preferred, but it seems to me like HTTPS is winning out due to convenience.

Chris Fuller Atlassian Team Feb 08, 2015

Interesting. I avoid using HTTPS access when I can because it's slower and has less convenient authentication conventions, but am happy to admit that other people may have different experiences in that regard. ;) I thought that the bitbucket.atlassian.net was a public system, as that's where https://jira.atlassian.com/browse/BB is directing people. If it doesn't allow public sign-ups and Atlassian ID credentials don't get you in, then I have to admit I'm not sure where to send you instead. :(

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,156 views 26 11
Join discussion

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