Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gomplate w/vault error: user: Current not implemented on linux/amd64 #79

Closed
drmdrew opened this issue Nov 19, 2016 · 2 comments
Closed
Assignees
Labels

Comments

@drmdrew
Copy link

drmdrew commented Nov 19, 2016

Example failure using gomplate inside a linux docker container:

nobody@5f067e23aa9a:/srv$ gomplate -v
gomplate version 1.2.1
nobody@5f067e23aa9a:/srv$ echo -n "{{(datasource \"vault\" \"secret\")}}" | gomplate -d vault="vault://"
2016/11/19 22:58:14 user: Current not implemented on linux/amd64

This looks to be due to os/user having a dependency on libc which is broken if CGO_ENABLED=0 when gomplate was built (see golang/go#11797)

vault/token_strategy.go:54:     u, err := user.Current()
vault/token_strategy_test.go:26:        u, err := user.Current()
@drmdrew
Copy link
Author

drmdrew commented Nov 19, 2016

Since cross-compiling several platforms with CGO_ENABLED is the very definition of non-trivial ... one approach would be to look for HOME (Mac+Linux) and USERPROFILE (Windows) environment variables and use those to locate ~/.vault-token for each supported platform.

@hairyhenderson
Copy link
Owner

Aw man, I'm so fired. I totally ran across this a week or 2 ago, too... 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants