pombreda / gcalcli

Automatically exported from code.google.com/p/gcalcli
0 stars 0 forks source link

Would like to be able to supply credentials from a config file, rather than the command line #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi! I want to run with the version from subversion, so editing gcalcli
directly to add my credentials is not convenient. Neither is supplying my
credentials via the command line. Here is a simple patch to read
credentials from a file in ~/.gcalcli.

An example file would look like this:

[credentials]
username=foo@gmail.com
password=lazy

Of course, storing credentials in plaintext is sloppy and dangerous. It
would be interesting to hook this up to use AuthSub.

Original issue reported on code.google.com by elliot.m...@gmail.com on 2 Oct 2007 at 6:43

Attachments:

GoogleCodeExporter commented 9 years ago
I agree.  This is high on my list of things to do.  Thank you for the patch.  
I'll
incorporate it or something very much like it.

Original comment by insa...@gmail.com on 2 Oct 2007 at 7:01

GoogleCodeExporter commented 9 years ago
Another option would be to prompt for the password if it is not specified on the
command line.

Once authenticated the auth token could be saved to ~/.gcalcli and used as long 
as it
works, so you are not prompted on every run.

Original comment by marius.s...@gmail.com on 2 Oct 2007 at 8:11

GoogleCodeExporter commented 9 years ago
One more suggestion, since talk is cheap.

Ideally the username and password would be saved in the platform specific 
keystore,
the Keychain on Mac OS or the Keyring under Gnome.

No idea if there are Python bindings for these APIs. Ideally, again, you would 
use a
high level Python API that has different implementations on different platforms.

Original comment by marius.s...@gmail.com on 2 Oct 2007 at 8:18

GoogleCodeExporter commented 9 years ago
Definitely using GNOME keyring would be better than my quick hack. 
Keyring docs are here:
http://svn.gnome.org/viewcvs/gnome-keyring/trunk/doc/keyring-intro.txt?view=mark
up

However, going this route would mean different code for different linux 
environments,
not to mention OS X and Windows.

Original comment by elliot.m...@gmail.com on 2 Oct 2007 at 8:24

GoogleCodeExporter commented 9 years ago
To keep the ball rolling here are two examples of how to do this:
Gnome Keyring: http://www.rittau.org/blog/20070726-01
OS X Keychain:
http://bdash.net.nz/blog/2004/08/30/example-code-mac-os-x-keychain-access-from-p
ython/

Original comment by jli...@gmail.com on 4 Oct 2007 at 2:25

GoogleCodeExporter commented 9 years ago

Original comment by insa...@gmail.com on 5 Oct 2007 at 5:24

GoogleCodeExporter commented 9 years ago
The feature has been implemented and checked in to svn.  See Wiki for details.

Original comment by insa...@gmail.com on 8 Oct 2007 at 1:04

GoogleCodeExporter commented 9 years ago
reopened this issue for discussion of other methods of storing user/pass.  I 
like the
idea of using google auth tokens...

Original comment by insa...@gmail.com on 8 Oct 2007 at 2:19

GoogleCodeExporter commented 9 years ago
Lowering priority since I implemented config file support.

Original comment by insa...@gmail.com on 8 Oct 2007 at 2:52

GoogleCodeExporter commented 9 years ago
For some reason, my config file is not being read. It is simple:

(10:04:15 <~>) 0 $ more .gcalclirc
[gcalcli]
user: xxxxxxx
pw: xxxxxxx

Any ideas?

Original comment by fonnesb...@gmail.com on 23 Oct 2007 at 2:05

GoogleCodeExporter commented 9 years ago
@fonnesbeck:
could you please list version of gcalcli (head -n 3`which gcalcli`)
and pwd of .gcalclirc
and stat of .gcalclirc
?

Original comment by stm....@gmail.com on 10 Oct 2008 at 10:09

GoogleCodeExporter commented 9 years ago

Original comment by eda...@insanum.com on 30 Jul 2011 at 7:24