sentry-cli: Azure DevOps HTTPS and SSH git urls not being matched

Hi, I’m trying to automatically associate commits with an Azure DevOps repository. The trouble seems to be that sentry is only aware of the HTTPS endpoint for the repository, and my local git is using SSH.

As you see the repo is added in sentry: (I’ve masked the repo name)

sentry-cli repos list
+------+--------------+-------------------------------------------+
| Name | Provider     | URL                                       |
+------+--------------+-------------------------------------------+
| XXX  | Azure DevOps | https://xxx.visualstudio.com/XXX/_git/XXX |
+------+--------------+-------------------------------------------+

But the command sentry-cli releases set-commits --log-level=DEBUG --auto ${version} results in

INFO    2019-06-11 11:20:23.006086 +01:00 Resolving HEAD (XXX@HEAD)
DEBUG   2019-06-11 11:20:23.006334 +01:00   Got reference URL for repo XXX: https://XXX.visualstudio.com/XXX/_git/XXX
DEBUG   2019-06-11 11:20:23.006347 +01:00   Looking for reference URL https://XXX.visualstudio.com/XXX/_git/XXX
DEBUG   2019-06-11 11:20:23.006636 +01:00   not a match: ssh://XXX@vs-ssh.visualstudio.com:22/_ssh/XXX != https://XXX.visualstudio.com/XXX/_git/XXX
INFO    2019-06-11 11:20:23.014101 +01:00   -> no matching revision found
DEBUG   2019-06-11 11:20:23.014862 +01:00 error: running update nagger
error: Could not determine any commits to be associated automatically.

Basically, it looks like because DevOps’ HTTPS urls include the company name in the subdomain (https://XXX.visualstudio.com/XXX/_git/XXX) and the SSH ones don’t (ssh://XXX@vs-ssh.visualstudio.com:22/_ssh/XXX), the repo isn’t getting matched.

Thanks! Please let me know if I can offer any more info.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Interesting. That same point in the UI gives me git@ssh.dev.azure.com urls. Perhaps the URL style you have comes from private projects or on a paid account. I’ll see if I can get our URL normalizer to handle this new style of URL from azure.