In my local environment I added the source code in memstat.json.rb :
Wunderbar.warn("$USER: #{$USER}")
Wunderbar.warn("$PASSWORD: #{$PASSWORD}")
Wunderbar.warn("env.user: #{env.user}")
Wunderbar.warn("env.password: #{env.password}")
Wunderbar.warn("ENV['USER']: #{ENV['USER']}")
Wunderbar.warn("ENV['PASSWORD']: #{ENV['PASSWORD']}")
output from running the secretary "move to emeritus" action in memstat.json.rb:
_WARN $USER:
_WARN $PASSWORD:
_WARN env.user: clr
_WARN env.password:
_WARN ENV['USER']: clr
_WARN ENV['PASSWORD']:
So, with local testing either there is no password set or wunderbar is too
smart to actually print it. And I really do not know whether "clr" is my userid
on my mac or my apache id. I'm not prompted for my credentials when running
locally.
> On Jun 30, 2020, at 7:54 AM, sebb <[email protected]> wrote:
>
> The svnmucc command acts directly on the repo, so credentials are
> always required.
As you can see in the roster-emeritus branch memstat.json.rb is calling
multiUpdate_ which calls svnmucc_ passing the env as an argument.
> The only exception is if the repo doesn't require auth (e.g. a local test
> repo).
> One other exception: the 'help' command.
>
> For svn commands, credentials are generally needed for changes to the repo.
> For private repos, they are also needed for read-only access to the repo.
And when using the svn_ and multiUpdate_ functions the env is passed in, so any
credentials should already be there, right?
So in the local setupmymac environment, how do I get user and password put into
env?
Thanks,
Craig
>
> On Tue, 30 Jun 2020 at 14:24, Craig Russell <[email protected]> wrote:
>>
>> Maybe a simpler question: In the cgi environment, where are credentials to
>> be found? And when are credentials required to be presented? In the roster
>> environment, where are credentials found? And when are they needed to be
>> presented?
>>
>> Thanks,
>> Craig
>>
>>> On Jun 30, 2020, at 6:16 AM, Craig Russell <[email protected]> wrote:
>>>
>>> Anything more to add here? Please?
>>>
>>> Craig
>>>
>>>> On Jun 29, 2020, at 4:29 PM, Craig Russell <[email protected]> wrote:
>>>>
>>>> I'm just confused why the password is needed, since the "_" contains user
>>>> and password.
>>>>
>>>> Where does the password go when using multiUpdate? It's in the "_" that's
>>>> passed in. Where is the password missing?
>>>>
>>>> Thanks,
>>>> Craig
>>>>
>>>>> On Jun 29, 2020, at 3:56 PM, sebb <[email protected]> wrote:
>>>>>
>>>>> On Mon, 29 Jun 2020 at 23:31, Craig Russell <[email protected]> wrote:
>>>>>>
>>>>>> I'm testing the "move to emeritus" function with the changes that will
>>>>>> move emeritus-requests-received/member.txt to emeritus.
>>>>>>
>>>>>> All the code is in branch roster-emeritus. I'm getting this error from
>>>>>> memstat.json.rb when processing the move to emeritus. I don't know if
>>>>>> it's really a credentials issue or not. The transcript messages are not
>>>>>> very helpful...
>>>>>>
>>>>>> Any help?
>>>>>
>>>>> Try putting some debug into the code, e.g. at memstat.json.rb:21 add:
>>>>>
>>>>> raise RuntimeError.new("No password") unless env.password
>>>>>
>>>>> You should also be able to add items to the transcript using
>>>>>
>>>>> Wunderbar.warn
>>>>> or perhaps
>>>>> _.system('echo',...)
>>>>>
>>>>>> Thanks,
>>>>>> Craig
>>>>>>
>>>>>> {
>>>>>> "transcript": [
>>>>>> "$ svn checkout --non-interactive --depth empty --
>>>>>> https://svn.apache.org/repos/private/foundation
>>>>>> /var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/d20200629-3669-14icn6l",
>>>>>> " U
>>>>>> /var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/d20200629-3669-14icn6l",
>>>>>> "Checked out revision 97873.",
>>>>>> "",
>>>>>> "$ svn update --non-interactive --
>>>>>> /var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/d20200629-3669-14icn6l/members.txt",
>>>>>> "Updating
>>>>>> '/var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/d20200629-3669-14icn6l/members.txt':",
>>>>>> "A
>>>>>> /var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/d20200629-3669-14icn6l/members.txt",
>>>>>> "Updated to revision 97873.",
>>>>>> "",
>>>>>> "$ svnmucc --non-interactive --extra-args
>>>>>> /var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/d20200629-3669-14icn6l/svnmucc_input20200629-3669-1pq2n8h
>>>>>> --message Action\\ emeritus\\ for\\ sanjiva --no-auth-cache --revision
>>>>>> 97873",
>>>>>> "svnmucc: missing argument: --password",
>>>>>> "Type 'svnmucc --help' for usage."
>>>>>> ],
>>>>>> "exception": "#<RuntimeError: svnmucc failure 1 committing>",
>>>>>> "backtrace": [
>>>>>> "/Users/clr/apache/git/whimsy/lib/whimsy/asf/svn.rb:768:in
>>>>>> `multiUpdate_'",
>>>>>> "/Users/clr/apache/git/whimsy/www/roster/views/actions/memstat.json.rb:22:in
>>>>>> `_evaluate'",
>>>>>> "/Users/clr/apache/git/whimsy/www/roster/main.rb:204:in `block in <top
>>>>>> (required)>'",
>>>>>> "/Users/clr/apache/git/whimsy/lib/whimsy/asf/rack.rb:223:in `call'",
>>>>>> "/Users/clr/apache/git/whimsy/lib/whimsy/asf/rack.rb:48:in `call'",
>>>>>> "/Users/clr/apache/git/whimsy/lib/whimsy/asf/rack.rb:200:in `call'",
>>>>>> "/Users/clr/apache/git/whimsy/lib/whimsy/asf/rack.rb:254:in `call'"
>>>>>> ]
>>>>>> }
>>>>>> Craig L Russell
>>>>>> [email protected]
>>>>>>
>>>>
>>>> Craig L Russell
>>>> [email protected]
>>>>
>>>
>>> Craig L Russell
>>> [email protected]
>>>
>>
>> Craig L Russell
>> [email protected]
>>
Craig L Russell
[email protected]