advanced-security / gh-sbom

Generate SBOMs with gh CLI
MIT License
164 stars 13 forks source link

Command line not yet available #8

Closed sgoggins closed 1 year ago

sgoggins commented 1 year ago

I updated gh on ubuntu and OSX, but using this command after installing the extension gh sbom -l | jq generates:

gh sbom -l                    
unknown command "sbom" for "gh"

Usage:  gh <command> <subcommand> [flags]

Available commands:
  alias
  api
  auth
  browse
  codespace
  completion
  config
  extension
  gist
  gpg-key
  help
  issue
  label
  pr
  release
  repo
  run
  search
  secret
  ssh-key
  status
  variable
  workflow
steiza commented 1 year ago

That's odd! It seems to be working on Ubuntu for me:

$ gh --version
gh version 2.22.1 (2023-01-27)
https://github.com/cli/cli/releases/tag/v2.22.1
$ gh extension install advanced-security/gh-sbom
✓ Installed extension advanced-security/gh-sbom
$ gh sbom --help
Usage of .../gh/extensions/gh-sbom/gh-sbom:
  -c, --cyclonedx           Use CycloneDX SBOM format. Default is to use SPDX.
  -l, --license             Include license information from clearlydefined.io in SBOM.
  -r, --repository string   Repository to query. Current directory used by default.
pflag: help requested

Could you share your gh --version and the output of gh extension list?

sgoggins commented 1 year ago

I'm on Ubuntu 20.x and I think in need to do some special Foo to get the right version. If you know what distribution endpoint I need to add that would be swell. Otherwise consider this my problem and close the issue. :)

steiza commented 1 year ago

https://github.com/cli/cli/releases is the best place to go for Linux versions of gh, but there's information on using Debian-based package managers on https://github.com/cli/cli/blob/trunk/docs/install_linux.md as well.