Sentry-cli: For non git repositories explicit revisions are required

Created on 23 Mar 2020  路  4Comments  路  Source: getsentry/sentry-cli

I'm trying to use the BitBucket Server Integration
But when I try to use sentry-cli for commit integration I get the error. Here is the full log.

  INFO    2020-03-23 15:22:26.502851300 -04:00 Loaded config from C:\Users\olegs\.sentryclirc
  DEBUG   2020-03-23 15:22:26.534137900 -04:00 sentry-cli version: 1.51.1, platform: "windows", architecture: "x86_64"
  INFO    2020-03-23 15:22:26.534137900 -04:00 sentry-cli was invoked with the following command line: "C:\\Users\\olegs\\scoop\\apps\\sentry-cli\\current\\sentry.exe" "releases" "--org" "company-name-inc" "-p" "company-name-mobile" "--log-level=debug" "set-commits" "--auto" "1.0.0"
  DEBUG   2020-03-23 15:22:26.534137900 -04:00 request GET https://sentry.io/api/0/organizations/company-name-inc/repos/?cursor=
  DEBUG   2020-03-23 15:22:26.534137900 -04:00 using token authentication
  DEBUG   2020-03-23 15:22:26.549809100 -04:00 retry number 0, max retries: 0
  DEBUG   2020-03-23 15:22:26.665846100 -04:00 > GET /api/0/organizations/company-name-inc/repos/?cursor= HTTP/1.1
  DEBUG   2020-03-23 15:22:26.665846100 -04:00 > Host: sentry.io
  DEBUG   2020-03-23 15:22:26.665846100 -04:00 > Accept: */*
  DEBUG   2020-03-23 15:22:26.676416700 -04:00 > Connection: TE
  DEBUG   2020-03-23 15:22:26.676416700 -04:00 > TE: gzip
  DEBUG   2020-03-23 15:22:26.676416700 -04:00 > User-Agent: sentry-cli/1.51.1
  DEBUG   2020-03-23 15:22:26.676416700 -04:00 > Authorization: Bearer 1bb14d50***
  DEBUG   2020-03-23 15:22:26.739129500 -04:00 < HTTP/1.1 200 OK
  DEBUG   2020-03-23 15:22:26.739129500 -04:00 < Server: nginx
  DEBUG   2020-03-23 15:22:26.739129500 -04:00 < Date: Mon, 23 Mar 2020 19:22:26 GMT
  DEBUG   2020-03-23 15:22:26.739129500 -04:00 < Content-Type: application/json
  DEBUG   2020-03-23 15:22:26.739129500 -04:00 < Content-Length: 302
  DEBUG   2020-03-23 15:22:26.739129500 -04:00 < Connection: keep-alive
  DEBUG   2020-03-23 15:22:26.739129500 -04:00 < Access-Control-Allow-Headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization
  DEBUG   2020-03-23 15:22:26.739129500 -04:00 < X-Content-Type-Options: nosniff
  DEBUG   2020-03-23 15:22:26.754695600 -04:00 < Content-Language: en
  DEBUG   2020-03-23 15:22:26.754695600 -04:00 < Access-Control-Expose-Headers: X-Sentry-Error, Retry-After
  DEBUG   2020-03-23 15:22:26.754695600 -04:00 < Vary: Accept-Language, Cookie
  DEBUG   2020-03-23 15:22:26.754695600 -04:00 < X-XSS-Protection: 1; mode=block
  DEBUG   2020-03-23 15:22:26.754695600 -04:00 < Link: <https://sentry.io/api/0/organizations/company-name-inc/repos/?&cursor=100:-1:1>; rel="previous"; results="false"; cursor="100:-1:1", <https://sentry.io/api/0/organizations/company-name-inc/repos/?&cursor=100:1:0>; rel="next"; results="false"; cursor="100:1:0"
  DEBUG   2020-03-23 15:22:26.754695600 -04:00 < Allow: GET, POST, HEAD, OPTIONS
  DEBUG   2020-03-23 15:22:26.770294600 -04:00 < Access-Control-Allow-Origin: *
  DEBUG   2020-03-23 15:22:26.770294600 -04:00 < Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS
  DEBUG   2020-03-23 15:22:26.770294600 -04:00 < X-Frame-Options: deny
  DEBUG   2020-03-23 15:22:26.770294600 -04:00 < X-Served-By: web-0df6213e
  DEBUG   2020-03-23 15:22:26.770294600 -04:00 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
  DEBUG   2020-03-23 15:22:26.770294600 -04:00 response status: 200
  DEBUG   2020-03-23 15:22:26.770294600 -04:00 body: [{"status":"active","integrationId":"55167","externalSlug":"VW/company-name-web","name":"VW/company-name-web","provider":{"id":"integrations:bitbucket_server","name":"Bitbucket Server"},"url":"http://my-server-ip:my-server-port/projects/VW/repos/company-name-web/browse","id":"59940","dateCreated":"2020-03-23T15:17:30.820305Z"}]
  INFO    2020-03-23 15:22:26.785920700 -04:00 Resolving HEAD (VW/company-name-web@HEAD)
  DEBUG   2020-03-23 15:22:26.801670800 -04:00   unknown repository integrations:bitbucket_server:59940 (http://my-server-ip:my-server-port/projects/VW/repos/company-name-web/browse) skipped
  DEBUG   2020-03-23 15:22:26.801670800 -04:00 error: running update nagger
  INFO    2020-03-23 15:22:26.801670800 -04:00 Skipping update nagger update check
error: For non git repositories explicit revisions are required
  DEBUG   2020-03-23 15:22:26.801670800 -04:00 client close; no transport to shut down  (from sentry)
question

All 4 comments

You need to tell sentry-cli what are the commits that you want to track, as you are (as error says) not in git repository.

See: https://docs.sentry.io/cli/releases/#sentry-cli-commit-integration

In case you are deploying without access to the git repository, you can manually specify the commits instead. To do this, pass the --commit parameter to the set-commits command in the format REPO_NAME@REVISION.

Hi @kamilogorek,

Well, actually, I'm in a git repository, I can execute git status and other git commands.

@olsh I just realized that I forgot to release a recent change that introduced bitbucket_server to the list of supported VCSs... 馃槄I'll do that once Travis is back up - https://www.traviscistatus.com/
Will ping you once it's done! :)

Released in 1.52.0. Cheers! :)

Was this page helpful?
0 / 5 - 0 ratings