Error: user: Current requires cgo or $HOME set in environment
I'm not sure whether this is the correct place to report this. Just calling doctl gives this error.
Error: user: Current requires cgo or $HOME set in environment
OS: Ubuntu 19.10 Installed doctl via snap snap info doctl
name: doctl
summary: DigitalOcean command line tool
publisher: DigitalOcean✓
contact: https://github.com/digitalocean/doctl/issues
license: unset
description: |
Command-line tool for DigitalOcean services.
commands:
- doctl
snap-id: 37RaX7lHS7bKamfcFcXcx27EyAaCIzgG
tracking: stable
refresh-date: 2 days ago, at 10:06 CET
channels:
stable: v1.37.0 2020-01-13 (276) 10MB -
candidate: v1.37.0+git6.884a996 2020-01-29 (279) 10MB -
beta: ↑
edge: ↑
installed: v1.37.0 (276) 10MB -
I could not find anything on this. I'd be really grateful for any pointers.
Hi @rdd2 , I'm trying to reproduce it. I'll let you know what I find. Thanks for your report!
Thanks for your efforts.
I'll gladly diagnose on my end, just don't have much insight into the way snaps work. Can't see anything in syslog and also can't get doctl to throw more with -vvv etc.
I've tried remove --purge the snap and reinstalling it, but no luck.
Same issue on Termux @ Android 11 (linux-arm64)
Here's an easy repro:
❯ docker run -u 1001 digitalocean/doctl
Unable to find image 'digitalocean/doctl:latest' locally
latest: Pulling from digitalocean/doctl
486039affc0a: Pull complete
0f470479a140: Pull complete
5248f22c6b84: Pull complete
d8dc1ace80e0: Pull complete
Digest: sha256:111ebc8b6d2b7e81c07c410323a4f971f9f1bec2e9d9775552d47be179e2e3cf
Status: Downloaded newer image for digitalocean/doctl:latest
Error: user: Current requires cgo or $USER set in environment
The $USER isn't set within the env. Doctl has no c code so I think we can rule out this being a cgo issue. I used the following line to assign the user at runtime:
docker run -e USER=sguyah digitalocean/doctl
Does this help?
If there is any additional way we can help, please reopen this ticket and we'll get to it more promptly than we did this time.