-
Notifications
You must be signed in to change notification settings - Fork 314
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
Variable oauth storage location #805
Comments
Huh, that's an interesting use case... For now, I guess it shouldn't be too hard to support an env variable, flag, or an option within the config file... which seems the most ergonomic for your use case? Longer term, I'd imagine managing different auth accounts by name instead of twiddling files, something like the way |
I like your longer term suggestion, it seems the most streamlined and intuitive. For the short term though, is there a reason that calling the $GCALCLI_CONFIG env variable can't also trigger storing the oauth file in that same specified location? To me, that makes the most sense- if I'm specifying a folder to store config, that's where I'd expect all things related to that config to reside. If that's not an option, I'd think utilizing an option in the config file would make the next most sense. |
Yeah, I think I was coming to the same conclusion, that it might as well pick up oauth files in the same config dir if they exist. The downside is just the complexity of long chains of fallbacks: already there's quite a series of legacy paths the file can exist at, and e.g. it's kinda hard to explain recommended usage in the help to make the mechanisms discoverable and comprensible for anyone who may need them. Especially with But for now at least the code is no worse than it was previously if it's just restoring some supported paths that already existed, so I'll work on restoring some mechanism along those lines. |
K, are you able to test against the latest repo version that #806 fully solves your issue? |
I checked out the latest commit and forced a reinstall using
The first command works fine, but when I run the second one, it's telling me that the credentials are already configured, meaning the oauth is stored separate from the config dirctory I specified. I have a feeling I'm doing something wrong to trigger the oauth file being stored in the specified folder, since the oauth is still at |
The oauth files aren't placed in config by default, just if you manually drop the files into config they should take precedence over global files. Granted, nothing in the app explicitly tells you where to find the oauth files to move them, but I'm only intending this as a stopgap solution to unblock your case in the short term. |
No dice- I moved the oauth file into Anything else I could be missing? I think I must be doing something wrong: |
Yeah, that just sounds like not having the repo version successfully installed. What I usually do to run the repo version is to create a virtualenv, source the Anyway I'm pretty sure that mechanism works as intended if you just wait to use it in the release version. The only thing that's a little iffy still is discoverability, but I'm not sure how much effort I want to put into making this stopgap mechanism easy to use. |
Thanks- I'll wait for the push to 4.5.2- I did skim the changes in the commit and saw all the work. Much appreciated! |
I used to be able to store oauth files alongside config/cache in a folder of my choosing. It now appears that with --config-folder being depreciated, $GCALCLI_CONFIG only stores the .toml file in the folder of my choice. It does not, however, allow for storage of the oauth file in a location other than ~/.local/share/gcalcli/oauth.
I previously used gcalcli to pull multiple calendars from different accounts, and without being able to set the location for the oauth storage, I'm only able to pull one.
Is there a command I'm missing that will allow the oauth storage location to be set variably?
The text was updated successfully, but these errors were encountered: