miquella / vaulted

Spawning and storage of secure environments
MIT License
254 stars 30 forks source link

can't define environment? #202

Open depesz opened 1 year ago

depesz commented 1 year ago

Was using vaulted installed on ubuntu box, but recently migrated to fedora. Built vaulted, but I can't use old config.

Tried to make new one, and:

=$ vaulted add whatever
ERROR: an environment must be provided

More data:

=$ type -a vaulted
vaulted is /opt/go/bin/vaulted

=$ ls -l /opt/go/bin/vaulted
-rwxr-xr-x. 1 root root 2927955 Oct 18 15:17 /opt/go/bin/vaulted

=$ ldd /opt/go/bin/vaulted
        linux-vdso.so.1 (0x00007ffc76fe7000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f464ad4e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f464af67000)

=$ /opt/go/bin/vaulted help
ERROR: an environment must be provided

=$ /opt/go/bin/vaulted version
ERROR: an environment must be provided

=$ /opt/go/bin/vaulted ----help
bad flag syntax: ----help
Usage of /opt/go/bin/vaulted:
  -D    delete environment from vault
  -L    list environments in vault
  -a    add to environment interactively
  -f string
        vault filename (default "/home/depesz/.vaulted")
  -i    spawn a new shell populated with the environment
  -j    dump json version of environment
  -n string
        name of the environment

=$ /opt/go/bin/vaulted -a
ERROR: an environment must be provided

=$ /opt/go/bin/vaulted -a whatever
ERROR: cannot list/dump or update environments while spawning

What am I missing?

depesz commented 1 year ago

I think it is because when I did:

go install github.com/miquella/vaulted@latest

it looks that it installed v1:

=# echo $GOPATH
/opt/go

=# find $GOPATH | grep vaulted
/opt/go/pkg/mod/cache/download/github.com/miquella/vaulted
/opt/go/pkg/mod/cache/download/github.com/miquella/vaulted/@v
/opt/go/pkg/mod/cache/download/github.com/miquella/vaulted/@v/v1.0.0.info
/opt/go/pkg/mod/cache/download/github.com/miquella/vaulted/@v/v1.0.0.mod
/opt/go/pkg/mod/cache/download/github.com/miquella/vaulted/@v/list
/opt/go/pkg/mod/cache/download/github.com/miquella/vaulted/@v/v1.0.0.lock
/opt/go/pkg/mod/cache/download/github.com/miquella/vaulted/@v/v1.0.0.ziphash
/opt/go/pkg/mod/cache/download/github.com/miquella/vaulted/@v/v1.0.0.zip
/opt/go/pkg/mod/github.com/miquella/vaulted@v1.0.0
/opt/go/pkg/mod/github.com/miquella/vaulted@v1.0.0/.gitignore
/opt/go/pkg/mod/github.com/miquella/vaulted@v1.0.0/.travis.yml
/opt/go/pkg/mod/github.com/miquella/vaulted@v1.0.0/LICENSE
/opt/go/pkg/mod/github.com/miquella/vaulted@v1.0.0/README.md
/opt/go/pkg/mod/github.com/miquella/vaulted@v1.0.0/environ.go
/opt/go/pkg/mod/github.com/miquella/vaulted@v1.0.0/main.go
/opt/go/pkg/mod/github.com/miquella/vaulted@v1.0.0/vault
/opt/go/pkg/mod/github.com/miquella/vaulted@v1.0.0/vault/vault_file.go
/opt/go/bin/vaulted

This is on Fedora 36 Linux with Go 1.18.7.

Any idea on what I can do to fix it?