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

sudo: garden: command not found #907

Closed
marcus-sa opened this issue Jun 28, 2019 · 5 comments
Closed

sudo: garden: command not found #907

marcus-sa opened this issue Jun 28, 2019 · 5 comments
Assignees
Milestone

Comments

@marcus-sa
Copy link

marcus-sa commented Jun 28, 2019

Bug

Current Behavior

Unable to run garden get status as instructed in your Quick Start guide due to you not supporting sudo:

$ sudo garden get status
sudo: garden: command not found

sudo is required when using minikube with no drivers kubernetes/minikube#3760

Expected behavior

Being able to run garden as sudo user.

Environment

garden version: 0.10.0

@edvald
Copy link
Collaborator

edvald commented Jun 28, 2019

Hey @marcus-sa. I believe the issue is not that Garden can't be run as sudo, but rather that sudo garden can't find the garden binary. If you run sudo <full-path-to-garden> or symlink /usr/local/bin/garden to where you have Garden installed, it should work fine.

I'm curious though, why do you need to run Garden with sudo?

@marcus-sa
Copy link
Author

marcus-sa commented Jun 28, 2019

@edvald hey you're probably right.
As I wrote, starting minikube with no driver's locally requires sudo explicitly for accessing its config file in ones home directory.
Even though I ran chmod -R 777 . on it, unfortunately still failed.

This happens because

const minikubeEnv = await execa.stdout("minikube", ["docker-env", "--shell=bash"])

Isn't supported with no driver's specified, even though it uses docker as the container.

See these issues:
kubernetes/minikube#2443
kubernetes/minikube#2575
GoogleContainerTools/skaffold#112

As you can see in the first issue, arguments passed after minikube actually isn't needed when there's no vm driver.

@edvald
Copy link
Collaborator

edvald commented Jun 28, 2019

Ah, interesting. I guess we'd need to explicitly catch that error message or otherwise check which VM driver is in use. Should be easy to do, I'll flag it for our next update.

@eysi09
Copy link
Collaborator

eysi09 commented Jul 8, 2019

Fixed with #910 (assuming the original problem with sudo was a none-issue).

@eysi09 eysi09 closed this as completed Jul 8, 2019
@ghostnet2000
Copy link

cd to where you have Garden installed, and run chmod +x garden

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

No branches or pull requests

5 participants