google / zoekt

Fast trigram based code search
1.7k stars 113 forks source link

Change Bitbucket Default Clone URL #113

Open greenyouse opened 4 years ago

greenyouse commented 4 years ago

Hi, I found one other issue with the Bitbucket client. When a repository is created in Bitbucket the HTTP clone URL can have different formats depending on what the admin settings are for the repository or server.

The default clone URL from Bitbucket only includes the username but it looks like the current client setup is hard coded to use a URL with the username and password. Here's an example of the difference:

https://{username}@bitbucket.org/{repo}.git https://{username}:{password}@bitbucket.org/{repo}.git

The zoekt client will currently fail to clone the repository unless it uses the custom format with a username and password.

I had a hard time finding this called out explicitly in the Bitbucket docs but this page shows an example of the default clone setup.

Could the default clone URL be the username format? Then maybe a Bitbucket option could be added to the config to allow the custom username + password URL to be used?

huasome commented 4 years ago

I have a patch for zoekt for that.

https://github.com/google/zoekt/compare/master...squarit:master

It also includes pulling from a smart mirror.