Crypto error: Existing key file hash collision


#1

I am attempting to launch a studio but it says that my key hash is off. I haven’t changed my key.

▶ HAB_ORIGIN="chef-es" hab studio -k chef-es enter
   hab-studio: Importing 'chef-es' secret origin key
» Importing origin key from standard input
✗✗✗
✗✗✗ Crypto error: Existing key file /hab/cache/keys/chef-es-20160623231409.sig.key found but new version hash is different, failing to write new file over existing. (/hab/cache/keys/chef-es-20160623231409.sig.key = f1acdc7a58217326d1b2b99499647e1cb0c58e02f878c4c5d8538311b66d85f6, /hab/cache/keys/chef-es-20160623231409.sig.key.5efee97ae378 = 3678386e53faf2a53f72876fea70988096973d079677430352dd5e515285f2f0)
✗✗✗
   hab-studio: Importing 'chef-es' public origin key
» Importing origin key from standard input
★ Imported public origin key chef-es-20160623231409.
   hab-studio: Exported: HAB_AUTH_TOKEN=[redacted]
   hab-studio: Exported: HAB_ORIGIN=chef-es
   hab-studio: Exported: GITHUB_TOKEN=[redacted]
Unknown Studio Command

How do I go about debugging this?


#2

Same command but with RUST_LOG=debug

▶ RUST_LOG=debug HAB_ORIGIN="chef-es" hab studio -k chef-es enter
DEBUG 2018-10-01T20:47:44Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: true }, out: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:44Z: hab::command::studio::enter: Setting HAB_CACHE_KEY_PATH=/Users/tom/.hab/cache/keys
DEBUG 2018-10-01T20:47:44Z: hab::command::studio::enter: Setting ARTIFACT_PATH=/Users/tom/.hab/cache/artifacts
DEBUG 2018-10-01T20:47:44Z: hab::command::studio::docker: Running command: "/usr/local/bin/docker" "version" "--format=\'{{.Server.Os}}\'"
DEBUG 2018-10-01T20:47:44Z: hab::command::studio::docker: Running command: "/usr/local/bin/docker" "images" "habitat/default-studio:0.63.0" "-q"
DEBUG 2018-10-01T20:47:45Z: hab::command::studio::docker: Found Studio Docker image locally.
DEBUG 2018-10-01T20:47:45Z: hab::command::studio::docker: Running command: "/usr/local/bin/docker" "version" "--format=\'{{.Server.Os}}\'"
DEBUG 2018-10-01T20:47:45Z: hab::command::studio::docker: Running command: "/usr/local/bin/docker" "version" "--format=\'{{.Server.Os}}\'"
DEBUG 2018-10-01T20:47:45Z: hab::command::studio::docker: Running command: "/usr/local/bin/docker" "version" "--format=\'{{.Server.Os}}\'"
DEBUG 2018-10-01T20:47:45Z: hab::command::studio::docker: Running command: "/usr/local/bin/docker" "version" "--format=\'{{.Server.Os}}\'"
DEBUG 2018-10-01T20:47:46Z: hab::command::studio::docker: Running command: "/usr/local/bin/docker" "version" "--format=\'{{.Server.Os}}\'"
DEBUG 2018-10-01T20:47:46Z: hab::command::studio::docker: Setting container env var: "HAB_AUTH_TOKEN"='_Qk9YLTEKYmxkci0yMDE3MDkyNzAyMzcxNApibGRyLTIwMTcwOTI3MDIzNzE0ClByclB4UkxBMGNUU2EwUnJRK1lBbExMTlBJaWtjQkFFCnJ4V0UzQTlRNjI0REZ1TllTY3phWWIrcFBmNGxKL09KZ2JZbzVFUkhhL2EyL0tDRA=='
DEBUG 2018-10-01T20:47:46Z: hab::command::studio::docker: Setting container env var: "HAB_ORIGIN"='chef-es'
DEBUG 2018-10-01T20:47:46Z: hab::command::studio::docker: Setting container env var: "RUST_LOG"='debug'
DEBUG 2018-10-01T20:47:46Z: hab::command::studio::docker: Setting container env var: "HAB_STUDIO_SECRET_GITHUB_TOKEN"='4d0045153dbb24d40dca379c5bb9b39b170d4199'
DEBUG 2018-10-01T20:47:46Z: hab::command::studio::docker: Running command: "/usr/local/bin/docker" "version" "--format=\'{{.Server.Os}}\'"
DEBUG 2018-10-01T20:47:46Z: hab::command::studio::docker: Running command: "/usr/local/bin/docker" "version" "--format=\'{{.Server.Os}}\'"
DEBUG 2018-10-01T20:47:46Z: habitat_core::os::process::imp: Calling execvp(): ("/usr/local/bin/docker") ["run", "--rm", "--privileged", "--tty", "--interactive", "--env", "HAB_AUTH_TOKEN=_Qk9YLTEKYmxkci0yMDE3MDkyNzAyMzcxNApibGRyLTIwMTcwOTI3MDIzNzE0ClByclB4UkxBMGNUU2EwUnJRK1lBbExMTlBJaWtjQkFFCnJ4V0UzQTlRNjI0REZ1TllTY3phWWIrcFBmNGxKL09KZ2JZbzVFUkhhL2EyL0tDRA==", "--env", "HAB_ORIGIN=chef-es", "--env", "RUST_LOG=debug", "--env", "HAB_STUDIO_SECRET_GITHUB_TOKEN=4d0045153dbb24d40dca379c5bb9b39b170d4199", "--volume", "/Users/tom/code/chef/expeditor/components/lita-expeditor:/src", "--volume", "/Users/tom/.hab/cache/keys:/hab/cache/keys", "--volume", "/Users/tom/.hab/cache/artifacts:/hab/cache/artifacts", "--volume", "/var/run/docker.sock:/var/run/docker.sock", "habitat/default-studio:0.63.0", "-k", "chef-es", "enter"]
DEBUG 2018-10-01T20:47:47Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: true }, out: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:47Z: hab: clap cli args: ["hab", "pkg", "exec", "core/hab-backline", "mkdir"]
DEBUG 2018-10-01T20:47:47Z: hab: remaining cli args: ["-m", "1777", "-p", "/tmp"]
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Setting: PATH='/hab/pkgs/core/hab-plan-build/0.63.0/20180914030231/bin:/hab/pkgs/core/diffutils/3.3/20170513214227/bin:/hab/pkgs/core/less/481/20170513213936/bin:/hab/pkgs/core/make/4.2.1/20170513214620/bin:/hab/pkgs/core/mg/20160118/20170513220846/bin:/hab/pkgs/core/util-linux/2.27.1/20170513214732/bin:/hab/pkgs/core/vim/8.0.0004/20170513220742/bin:/hab/pkgs/core/ncurses/6.0/20170513213009/bin:/hab/pkgs/core/acl/2.2.52/20170513213108/bin:/hab/pkgs/core/attr/2.4.47/20170513213059/bin:/hab/pkgs/core/bash/4.3.42/20170513213519/bin:/hab/pkgs/core/binutils/2.25.1/20170513201927/bin:/hab/pkgs/core/bzip2/1.0.6/20170513212938/bin:/hab/pkgs/core/coreutils/8.25/20170513213226/bin:/hab/pkgs/core/file/5.24/20170513201915/bin:/hab/pkgs/core/findutils/4.4.2/20170513214305/bin:/hab/pkgs/core/gawk/4.1.3/20170513213646/bin:/hab/pkgs/core/glibc/2.22/20170513201042/bin:/hab/pkgs/core/grep/2.22/20170513213444/bin:/hab/pkgs/core/gzip/1.6/20170513214605/bin:/hab/pkgs/core/hab/0.63.0/20180914025124/bin:/hab/pkgs/core/libcap/2.24/20170513213120/bin:/hab/pkgs/core/libidn/1.32/20170513215043/bin:/hab/pkgs/core/openssl/1.0.2l/20171014213633/bin:/hab/pkgs/core/pcre/8.38/20170513213423/bin:/hab/pkgs/core/rq/0.9.2/20170612005822/bin:/hab/pkgs/core/sed/4.2.2/20170513213123/bin:/hab/pkgs/core/tar/1.29/20170513213607/bin:/hab/pkgs/core/unzip/6.0/20180310001951/bin:/hab/pkgs/core/wget/1.19.1/20171024102323/bin:/hab/pkgs/core/xz/5.2.2/20170513214327/bin'
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Running: /hab/pkgs/core/coreutils/8.25/20170513213226/bin/mkdir -m 1777 -p /tmp
DEBUG 2018-10-01T20:47:47Z: habitat_core::os::process::imp: Calling execvp(): ("/hab/pkgs/core/coreutils/8.25/20170513213226/bin/mkdir") ["-m", "1777", "-p", "/tmp"]
DEBUG 2018-10-01T20:47:47Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: true }, out: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:47Z: hab: clap cli args: ["hab", "pkg", "exec", "core/hab-backline", "mkdir"]
DEBUG 2018-10-01T20:47:47Z: hab: remaining cli args: ["-m", "0750", "-p", "/root"]
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Setting: PATH='/hab/pkgs/core/hab-plan-build/0.63.0/20180914030231/bin:/hab/pkgs/core/diffutils/3.3/20170513214227/bin:/hab/pkgs/core/less/481/20170513213936/bin:/hab/pkgs/core/make/4.2.1/20170513214620/bin:/hab/pkgs/core/mg/20160118/20170513220846/bin:/hab/pkgs/core/util-linux/2.27.1/20170513214732/bin:/hab/pkgs/core/vim/8.0.0004/20170513220742/bin:/hab/pkgs/core/ncurses/6.0/20170513213009/bin:/hab/pkgs/core/acl/2.2.52/20170513213108/bin:/hab/pkgs/core/attr/2.4.47/20170513213059/bin:/hab/pkgs/core/bash/4.3.42/20170513213519/bin:/hab/pkgs/core/binutils/2.25.1/20170513201927/bin:/hab/pkgs/core/bzip2/1.0.6/20170513212938/bin:/hab/pkgs/core/coreutils/8.25/20170513213226/bin:/hab/pkgs/core/file/5.24/20170513201915/bin:/hab/pkgs/core/findutils/4.4.2/20170513214305/bin:/hab/pkgs/core/gawk/4.1.3/20170513213646/bin:/hab/pkgs/core/glibc/2.22/20170513201042/bin:/hab/pkgs/core/grep/2.22/20170513213444/bin:/hab/pkgs/core/gzip/1.6/20170513214605/bin:/hab/pkgs/core/hab/0.63.0/20180914025124/bin:/hab/pkgs/core/libcap/2.24/20170513213120/bin:/hab/pkgs/core/libidn/1.32/20170513215043/bin:/hab/pkgs/core/openssl/1.0.2l/20171014213633/bin:/hab/pkgs/core/pcre/8.38/20170513213423/bin:/hab/pkgs/core/rq/0.9.2/20170612005822/bin:/hab/pkgs/core/sed/4.2.2/20170513213123/bin:/hab/pkgs/core/tar/1.29/20170513213607/bin:/hab/pkgs/core/unzip/6.0/20180310001951/bin:/hab/pkgs/core/wget/1.19.1/20171024102323/bin:/hab/pkgs/core/xz/5.2.2/20170513214327/bin'
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Running: /hab/pkgs/core/coreutils/8.25/20170513213226/bin/mkdir -m 0750 -p /root
DEBUG 2018-10-01T20:47:47Z: habitat_core::os::process::imp: Calling execvp(): ("/hab/pkgs/core/coreutils/8.25/20170513213226/bin/mkdir") ["-m", "0750", "-p", "/root"]
DEBUG 2018-10-01T20:47:47Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: false }, out: OutputStream { coloring: Auto, isatty: false, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:47Z: hab: clap cli args: ["hab", "pkg", "exec", "core/hab-backline", "tr"]
DEBUG 2018-10-01T20:47:47Z: hab: remaining cli args: [",", " "]
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Setting: PATH='/hab/pkgs/core/hab-plan-build/0.63.0/20180914030231/bin:/hab/pkgs/core/diffutils/3.3/20170513214227/bin:/hab/pkgs/core/less/481/20170513213936/bin:/hab/pkgs/core/make/4.2.1/20170513214620/bin:/hab/pkgs/core/mg/20160118/20170513220846/bin:/hab/pkgs/core/util-linux/2.27.1/20170513214732/bin:/hab/pkgs/core/vim/8.0.0004/20170513220742/bin:/hab/pkgs/core/ncurses/6.0/20170513213009/bin:/hab/pkgs/core/acl/2.2.52/20170513213108/bin:/hab/pkgs/core/attr/2.4.47/20170513213059/bin:/hab/pkgs/core/bash/4.3.42/20170513213519/bin:/hab/pkgs/core/binutils/2.25.1/20170513201927/bin:/hab/pkgs/core/bzip2/1.0.6/20170513212938/bin:/hab/pkgs/core/coreutils/8.25/20170513213226/bin:/hab/pkgs/core/file/5.24/20170513201915/bin:/hab/pkgs/core/findutils/4.4.2/20170513214305/bin:/hab/pkgs/core/gawk/4.1.3/20170513213646/bin:/hab/pkgs/core/glibc/2.22/20170513201042/bin:/hab/pkgs/core/grep/2.22/20170513213444/bin:/hab/pkgs/core/gzip/1.6/20170513214605/bin:/hab/pkgs/core/hab/0.63.0/20180914025124/bin:/hab/pkgs/core/libcap/2.24/20170513213120/bin:/hab/pkgs/core/libidn/1.32/20170513215043/bin:/hab/pkgs/core/openssl/1.0.2l/20171014213633/bin:/hab/pkgs/core/pcre/8.38/20170513213423/bin:/hab/pkgs/core/rq/0.9.2/20170612005822/bin:/hab/pkgs/core/sed/4.2.2/20170513213123/bin:/hab/pkgs/core/tar/1.29/20170513213607/bin:/hab/pkgs/core/unzip/6.0/20180310001951/bin:/hab/pkgs/core/wget/1.19.1/20171024102323/bin:/hab/pkgs/core/xz/5.2.2/20170513214327/bin'
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Running: /hab/pkgs/core/coreutils/8.25/20170513213226/bin/tr ,
DEBUG 2018-10-01T20:47:47Z: habitat_core::os::process::imp: Calling execvp(): ("/hab/pkgs/core/coreutils/8.25/20170513213226/bin/tr") [",", " "]
   hab-studio: Importing 'chef-es' secret origin key
DEBUG 2018-10-01T20:47:47Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: true }, out: OutputStream { coloring: Auto, isatty: false, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:47Z: hab: clap cli args: ["hab", "origin", "key", "export", "--type", "secret", "chef-es"]
DEBUG 2018-10-01T20:47:47Z: hab: remaining cli args: []
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: chef-es-20160623231409.sig.key
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: chef-20160614114050.sig.key
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: tduffield-20170913145600.sig.key
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: devchef-20180312184332.sig.key
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: chefops-20180305195555.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: core-20180119235000.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: Invalid key content in DirEntry("/hab/cache/keys/foo-20170208023947.sig.key") for type sig
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: foo-20170208023947.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: devchef-20180312184332.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: chef-es-20160623231409.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: chefops-20180305195555.sig.key
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: chef-ci-20170918142747.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: Invalid key content in DirEntry("/hab/cache/keys/.sig.key") for type sig
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: tduffield-20170913145600.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: core-20160810182414.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: core-20170318210306.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: afiune-20170727154207.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: chef-ci-20170918142747.sig.key
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: checking file: chef-20160614114050.pub
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys: valid key suffix
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys::sig_key_pair: revisions = ["chef-es-20160623231409"]
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys::sig_key_pair: Attempting to read key name_with_rev chef-es-20160623231409 for chef-es
DEBUG 2018-10-01T20:47:47Z: hab::command::origin::key::export: Streaming file contents of secret /hab/cache/keys/chef-es-20160623231409.sig.key to standard out
DEBUG 2018-10-01T20:47:47Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: false }, out: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:47Z: hab: clap cli args: ["hab", "origin", "key", "import"]
DEBUG 2018-10-01T20:47:47Z: hab: remaining cli args: []
» Importing origin key from standard input
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys::sig_key_pair: Writing temp key file /hab/cache/keys/chef-es-20160623231409.sig.key.2bd8997a588d
✗✗✗
✗✗✗ Crypto error: Existing key file /hab/cache/keys/chef-es-20160623231409.sig.key found but new version hash is different, failing to write new file over existing. (/hab/cache/keys/chef-es-20160623231409.sig.key = f1acdc7a58217326d1b2b99499647e1cb0c58e02f878c4c5d8538311b66d85f6, /hab/cache/keys/chef-es-20160623231409.sig.key.2bd8997a588d = 3678386e53faf2a53f72876fea70988096973d079677430352dd5e515285f2f0)
✗✗✗
   hab-studio: Importing 'chef-es' public origin key
DEBUG 2018-10-01T20:47:47Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: false }, out: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:47Z: hab: clap cli args: ["hab", "origin", "key", "import"]
DEBUG 2018-10-01T20:47:47Z: hab: remaining cli args: []
» Importing origin key from standard input
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys::sig_key_pair: Writing temp key file /hab/cache/keys/chef-es-20160623231409.pub.93943d6b889e
DEBUG 2018-10-01T20:47:47Z: habitat_core::crypto::keys::sig_key_pair: New content hash matches existing file /hab/cache/keys/chef-es-20160623231409.pub hash, removing temp key file /hab/cache/keys/chef-es-20160623231409.pub.93943d6b889e.
★ Imported public origin key chef-es-20160623231409.
   hab-studio: Exported: HAB_AUTH_TOKEN=[redacted]
   hab-studio: Exported: HAB_ORIGIN=chef-es
DEBUG 2018-10-01T20:47:47Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: false }, out: OutputStream { coloring: Auto, isatty: false, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:47Z: hab: clap cli args: ["hab", "pkg", "exec", "core/coreutils", "cut"]
DEBUG 2018-10-01T20:47:47Z: hab: remaining cli args: ["-d", "=", "-f", "1"]
DEBUG 2018-10-01T20:47:47Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: true }, out: OutputStream { coloring: Auto, isatty: false, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:47Z: hab: clap cli args: ["hab", "pkg", "exec", "core/hab-backline", "env"]
DEBUG 2018-10-01T20:47:47Z: hab: remaining cli args: []
DEBUG 2018-10-01T20:47:47Z: habitat_common::ui: UI { shell: Shell { input: InputStream { isatty: false }, out: OutputStream { coloring: Auto, isatty: false, is_colored(): true, supports_color(): true }, err: OutputStream { coloring: Auto, isatty: true, is_colored(): true, supports_color(): true } } }
DEBUG 2018-10-01T20:47:47Z: hab: clap cli args: ["hab", "pkg", "exec", "core/hab-backline", "awk"]
DEBUG 2018-10-01T20:47:47Z: hab: remaining cli args: ["-F", "=", "/^HAB_STUDIO_SECRET_/ {gsub(/HAB_STUDIO_SECRET_/, \"\"); print}"]
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Setting: PATH='/hab/pkgs/core/hab-plan-build/0.63.0/20180914030231/bin:/hab/pkgs/core/diffutils/3.3/20170513214227/bin:/hab/pkgs/core/less/481/20170513213936/bin:/hab/pkgs/core/make/4.2.1/20170513214620/bin:/hab/pkgs/core/mg/20160118/20170513220846/bin:/hab/pkgs/core/util-linux/2.27.1/20170513214732/bin:/hab/pkgs/core/vim/8.0.0004/20170513220742/bin:/hab/pkgs/core/ncurses/6.0/20170513213009/bin:/hab/pkgs/core/acl/2.2.52/20170513213108/bin:/hab/pkgs/core/attr/2.4.47/20170513213059/bin:/hab/pkgs/core/bash/4.3.42/20170513213519/bin:/hab/pkgs/core/binutils/2.25.1/20170513201927/bin:/hab/pkgs/core/bzip2/1.0.6/20170513212938/bin:/hab/pkgs/core/coreutils/8.25/20170513213226/bin:/hab/pkgs/core/file/5.24/20170513201915/bin:/hab/pkgs/core/findutils/4.4.2/20170513214305/bin:/hab/pkgs/core/gawk/4.1.3/20170513213646/bin:/hab/pkgs/core/glibc/2.22/20170513201042/bin:/hab/pkgs/core/grep/2.22/20170513213444/bin:/hab/pkgs/core/gzip/1.6/20170513214605/bin:/hab/pkgs/core/hab/0.63.0/20180914025124/bin:/hab/pkgs/core/libcap/2.24/20170513213120/bin:/hab/pkgs/core/libidn/1.32/20170513215043/bin:/hab/pkgs/core/openssl/1.0.2l/20171014213633/bin:/hab/pkgs/core/pcre/8.38/20170513213423/bin:/hab/pkgs/core/rq/0.9.2/20170612005822/bin:/hab/pkgs/core/sed/4.2.2/20170513213123/bin:/hab/pkgs/core/tar/1.29/20170513213607/bin:/hab/pkgs/core/unzip/6.0/20180310001951/bin:/hab/pkgs/core/wget/1.19.1/20171024102323/bin:/hab/pkgs/core/xz/5.2.2/20170513214327/bin'
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Running: /hab/pkgs/core/coreutils/8.25/20170513213226/bin/env
DEBUG 2018-10-01T20:47:47Z: habitat_core::os::process::imp: Calling execvp(): ("/hab/pkgs/core/coreutils/8.25/20170513213226/bin/env") []
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Setting: PATH='/hab/pkgs/core/hab-plan-build/0.63.0/20180914030231/bin:/hab/pkgs/core/diffutils/3.3/20170513214227/bin:/hab/pkgs/core/less/481/20170513213936/bin:/hab/pkgs/core/make/4.2.1/20170513214620/bin:/hab/pkgs/core/mg/20160118/20170513220846/bin:/hab/pkgs/core/util-linux/2.27.1/20170513214732/bin:/hab/pkgs/core/vim/8.0.0004/20170513220742/bin:/hab/pkgs/core/ncurses/6.0/20170513213009/bin:/hab/pkgs/core/acl/2.2.52/20170513213108/bin:/hab/pkgs/core/attr/2.4.47/20170513213059/bin:/hab/pkgs/core/bash/4.3.42/20170513213519/bin:/hab/pkgs/core/binutils/2.25.1/20170513201927/bin:/hab/pkgs/core/bzip2/1.0.6/20170513212938/bin:/hab/pkgs/core/coreutils/8.25/20170513213226/bin:/hab/pkgs/core/file/5.24/20170513201915/bin:/hab/pkgs/core/findutils/4.4.2/20170513214305/bin:/hab/pkgs/core/gawk/4.1.3/20170513213646/bin:/hab/pkgs/core/glibc/2.22/20170513201042/bin:/hab/pkgs/core/grep/2.22/20170513213444/bin:/hab/pkgs/core/gzip/1.6/20170513214605/bin:/hab/pkgs/core/hab/0.63.0/20180914025124/bin:/hab/pkgs/core/libcap/2.24/20170513213120/bin:/hab/pkgs/core/libidn/1.32/20170513215043/bin:/hab/pkgs/core/openssl/1.0.2l/20171014213633/bin:/hab/pkgs/core/pcre/8.38/20170513213423/bin:/hab/pkgs/core/rq/0.9.2/20170612005822/bin:/hab/pkgs/core/sed/4.2.2/20170513213123/bin:/hab/pkgs/core/tar/1.29/20170513213607/bin:/hab/pkgs/core/unzip/6.0/20180310001951/bin:/hab/pkgs/core/wget/1.19.1/20171024102323/bin:/hab/pkgs/core/xz/5.2.2/20170513214327/bin'
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Running: /hab/pkgs/core/gawk/4.1.3/20170513213646/bin/awk -F = /^HAB_STUDIO_SECRET_/ {gsub(/HAB_STUDIO_SECRET_/, ""); print}
DEBUG 2018-10-01T20:47:47Z: habitat_core::os::process::imp: Calling execvp(): ("/hab/pkgs/core/gawk/4.1.3/20170513213646/bin/awk") ["-F", "=", "/^HAB_STUDIO_SECRET_/ {gsub(/HAB_STUDIO_SECRET_/, \"\"); print}"]
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Setting: PATH='/hab/pkgs/core/coreutils/8.25/20170513213226/bin:/hab/pkgs/core/glibc/2.22/20170513201042/bin:/hab/pkgs/core/acl/2.2.52/20170513213108/bin:/hab/pkgs/core/attr/2.4.47/20170513213059/bin:/hab/pkgs/core/libcap/2.24/20170513213120/bin'
DEBUG 2018-10-01T20:47:47Z: hab::command::pkg::exec: Running: /hab/pkgs/core/coreutils/8.25/20170513213226/bin/cut -d = -f 1
DEBUG 2018-10-01T20:47:47Z: habitat_core::os::process::imp: Calling execvp(): ("/hab/pkgs/core/coreutils/8.25/20170513213226/bin/cut") ["-d", "=", "-f", "1"]
   hab-studio: Exported: GITHUB_TOKEN=[redacted]
Unknown Studio Command

#3

Same issues occurs in 0.63.0 and 0.64.1.


#4

If I remove the -k I can get into the studio, but I still get the key error.


#5

what does /hab/cache/keys look like?

It’s weird that it looks like it tries to import from stdin.


#6
[2][default:/src:0]# ls -alh /hab/cache/keys
total 80K
drwxr-xr-x 21 root root  672 Oct  1 20:52 .
drwxr-xr-x  5 root root 4.0K Sep 28 01:51 ..
-rw-r--r--  1 root root    1 Oct 26  2017 .sig.key
-rw-r--r--  1 root root   77 Sep 14  2017 afiune-20170727154207.pub
-rw-r--r--  1 root root   75 Sep 18  2017 chef-20160614114050.pub
-rw-r--r--  1 root root  120 Sep 18  2017 chef-20160614114050.sig.key
-r--------  1 root root   78 Sep 18  2017 chef-ci-20170918142747.pub
-rw-r--r--  1 root root  122 Sep 18  2017 chef-ci-20170918142747.sig.key
-rw-r--r--  1 root root   78 Oct  1 20:36 chef-es-20160623231409.pub
-rw-r--r--  1 root root  123 Sep  7  2017 chef-es-20160623231409.sig.key
-rw-r--r--  1 root root   79 Jul 25 19:30 chefops-20180305195555.pub
-rw-r--r--  1 root root  123 Jul 25 19:29 chefops-20180305195555.sig.key
-rw-r--r--  1 root root   75 Sep 14  2017 core-20160810182414.pub
-rw-r--r--  1 root root   75 Sep 14  2017 core-20170318210306.pub
-rw-r--r--  1 root root   75 Oct  1 20:31 core-20180119235000.pub
-r--------  1 root root   78 Mar 12  2018 devchef-20180312184332.pub
-r--------  1 root root  122 Mar 12  2018 devchef-20180312184332.sig.key
-rw-r--r--  1 root root   74 Mar 26  2018 foo-20170208023947.pub
-rw-r--r--  1 root root  102 Mar 26  2018 foo-20170208023947.sig.key
-rw-r--r--  1 root root   80 Sep 13  2017 tduffield-20170913145600.pub
-rw-r--r--  1 root root  124 Sep 13  2017 tduffield-20170913145600.sig.key

#7

This is probably the culprit, but I’m not sure how https://github.com/habitat-sh/habitat/blob/master/components/rootless_studio/default/etc/habitat-studio/import_keys.sh#L7-L18