Hello,

I'd like to create a riak-cs user with a pre-set key/secret and am following 
the workaround from https://github.com/basho/riak_cs/issues/565. This is works 
when I type it into the interactive riak-cs console, however I want to script 
this in a non-interactive fashion.

I've created a small erlang script and am using riak-cs escript to run it (I 
don't know erlang at all so there are probably basic errors).

This is what I get when I run the script:

# riak-cs escript /tmp/createuser.erl
{error,admin_key_undefined}

Here is my script:

# cat /tmp/createuser.erl
#!/usr/bin/env escript
-import(riak_cs_user, [create_user/4]).

main(_) ->
    R = riak_cs_user:create_user("test", "t...@ttd.com", "blah", "foo"),
    Rs=lists:flatten(io_lib:format("~p", [R])),
    io:format(Rs),
    io:format("\n").

Any pointers?

Thanks!
Gautam
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to