sentry-cli: error: For non git repositories explicit revisions are required

Trying to setup releases as described in docs docs: https://docs.sentry.io/learn/releases/

Following the steps:

# Assumes you're in a git repository
export SENTRY_AUTH_TOKEN=...
export SENTRY_ORG=my-org
VERSION=$(sentry-cli releases propose-version)

# Create a release
sentry-cli releases new -p project1 -p project2 $VERSION

# Associate commits with the release
sentry-cli releases set-commits --auto $VERSION

All works well except for the last command sentry-cli releases set-commits --auto $VERSION which returns: error: For non git repositories explicit revisions are required

sentry-cli --version
sentry-cli 1.35.4

This issue seems to be similar to https://github.com/getsentry/sentry-cli/issues/115 and https://github.com/getsentry/sentry-cli/issues/300, but unlike both of those issues, my repo is a Github repo:

sentry-cli repos list
+----------------------------------+----------+-----------------------------------------------------+
| Name                             | Provider | URL                                                 |
+----------------------------------+----------+-----------------------------------------------------+
| getslideapp/slide-django-adaptor | GitHub   | https://github.com/getslideapp/slide-django-adaptor |
+----------------------------------+----------+-----------------------------------------------------+

One additional piece of information is that since I have multiple Github accounts on my machine, I use a configuration as described in this gist: https://gist.github.com/jexchan/2351996. As such, my github hostname is github.com-tjg37 instead of github.com. I’m not sure if this is the source of the issue, but if it is, would it be possible to allow for hostnames of this form?

git config --get remote.origin.url
git@github.com-tjg37:getslideapp/slide-django-adaptor.git

Also, as suggested in https://github.com/getsentry/sentry-cli/issues/115 and https://github.com/getsentry/sentry-cli/issues/300, if I manually add the previous commits sentry-cli releases set-commits $VERSION --commit "$REPO@$VERSION" it works.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 24 (6 by maintainers)

Most upvoted comments

I’m also getting the same problem. Seems to have started yesterday for us since GitHub had some issues. Still not working this morning and GH is working fine.

We’re running the commands:

sentry-cli releases new -p $SENTRY_PROJECT $VERSION
sentry-cli releases set-commits --auto $VERSION

Strarted to happen today to me as well. I’ve tried to upgrade sentry-cli to latest 1.35.5, but that made no difference.

Without knowing rust, I think the problem is here:

https://github.com/getsentry/sentry-cli/blob/7b119dfbd097a538d18fc6ebc6f41fd6917343e2/src/utils/vcs.rs#L172

As sentry since https://github.com/getsentry/sentry/commit/efcac0a82c364ffe1df09453efaada9910eab0c8#diff-0a897e12089601a38ba4d1841135961d uses integrations: prefix in the provider id while listing the repositories:

[
    {
        "dateCreated": "2018-08-26T07:26:22.579Z",
        "id": "13618",
        "integrationId": "5604",
        "name": "WeblateOrg/weblate",
        "provider": {
            "id": "integrations:github",
            "name": "GitHub"
        },
        "status": "active",
        "url": "https://github.com/WeblateOrg/weblate"
    }
]