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

Setting just LAB_CORE_HOST does nothing #269

Closed
mpickering opened this issue Dec 20, 2018 · 6 comments
Closed

Setting just LAB_CORE_HOST does nothing #269

mpickering opened this issue Dec 20, 2018 · 6 comments
Milestone

Comments

@mpickering
Copy link

I have set LAB_CORE_HOST to the correct URL for our project but the program still prompts for the gitlab host on the first run. It seems that unless all three variables are set then the others are ignored.

@zaquestion
Copy link
Owner

@mpickering This is correct, lab needs all 3 values to operate. If it can't find them and the config file doesn't exist it assumes it needs to prompt you for the values. You're correct that lab ignores the variables in this case.

I think theres a case to be made that we should only require host and user since for public uses I believe we don't need the token. I'm not sure what the request here is though.. What would you like lab to do differently?

@mpickering
Copy link
Author

I intended to wrap the executable so that our users would only have to provide their token. The wrapper would set LAB_CORE_HOST and then call lab like normal.

What is the username used for btw? Is the token on its own not sufficient?

@zaquestion
Copy link
Owner

You're probably right, these requirements are from the earliest days of lab. Its probably just an API call to get the username, so we probably only need the token. Lab uses it largely for searching and naming remotes

@zaquestion
Copy link
Owner

Will definitely check it out, and contributions welcome.

We can change the creds logic to not prompt if we already have an environment variables set.

zaquestion added a commit that referenced this issue Dec 27, 2018
@zaquestion
Copy link
Owner

@mpickering I've made some changes to remove the need to set the username explicitly and have lab use LAB_CORE_HOST to skip prompting for a host on first setup.

I'll get it merged in this week. There are a few other items in the next milestone and I'd like to see if I can get a few more in, but I'll try and do a release this week since theres a good amount in it.

zaquestion added a commit that referenced this issue Dec 27, 2018
@zaquestion zaquestion added this to the 0.15.0 milestone Dec 28, 2018
@zaquestion
Copy link
Owner

@mpickering I've release this functionality in 0.15.0

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