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

How to use gcloud-cli as non-root user? #103

Closed
levelxplane opened this issue Oct 13, 2017 · 3 comments
Closed

How to use gcloud-cli as non-root user? #103

levelxplane opened this issue Oct 13, 2017 · 3 comments

Comments

@levelxplane
Copy link

Hello,

I currently use this dockerimage as a way to use gcloud-cli in multiple projects/zones simultaneously. It works well. However, when trying to use gcloud compute ssh, i'll have specify which user to use, otherwise it will throw an error saying not to use 'root' to log in. This isn't a big deal, but it's just extra typing that I don't feel like doing.

In response, I added a user(the name of my username on all of our GCP instances), but now I can't use ANY gcloud commands because i'll get an error saying:

ERROR: gcloud crashed (OperationalError): unable to open database file

I'm assuming this is a permission issue, since it runs fine when I use 'sudo su' to run the command.
Is there a specific way I can add root-like permissions to my user?

Alternatively, how do I access gcloud commands as a non-root user?

@ahmetb
Copy link
Contributor

ahmetb commented Oct 13, 2017

Can you paste the exact command you're using and the error you're seeing? It's not very clear which user you're referring to (user on the remote VM or in the container etc.)

@ahmetb
Copy link
Contributor

ahmetb commented Oct 26, 2017

@levelxplane any updates here? Are you still having the problem?

@levelxplane
Copy link
Author

@ahmetb Hey. Sorry for late response. I ended up just abandoning the issue and working around it.

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

2 participants