Ok so I tell a lie - I do, in fact, have a passphrase attached to that key.
That's what comes with adding it to a keychain and not having to remember
it :)

So interestingly as you point out in the ssh session to my machine where
the keychain doesn't work the behaviour is as you describe. Without -i you
get the anonymous error, whilst with -i you get prompted.

In a normal desktop session though without -i gives you the anonymous error
whilst with -i you don't get prompted as obviously the keychain is coming
into play.

Will try and have a quick debug of the code and then raise an issue with my
findings.

Thanks again
Richard.


On Tue, Jun 11, 2013 at 11:56 PM, Richard Bywater <[email protected]> wrote:

> No passphrase is set so shouldn't be an issue (i.e. if I use -i there's no
> prompt for passphrase or anything).
>
> Will file an issue.
>
> Thanks!
> Richard.
>
>
> On Tue, Jun 11, 2013 at 11:37 PM, Jesse Glick <[email protected]>wrote:
>
>> On 06/11/2013 04:38 AM, Richard Bywater wrote:
>>
>>> the following command succeeds:
>>> java -jar jenkins-cli.jar -i ~/.ssh/id_rsa -s http://myhost/cisafe-restart
>>>
>>> java -jar jenkins-cli.jar -s http://myhost/ci safe-restart
>>>
>>> Unfortunately the latter gives me:
>>> hudson.security.**AccessDeniedException2: anonymous is missing the
>>> Administer permission
>>>
>>> wondering if this is a defect in the system
>>>
>>
>> I have seen it too with ~/.ssh/id_dsa. Please file it.
>>
>> Do you have a passphrase set on ~/.ssh/id_rsa? I think the bug is that
>> you are prompted for a passphrase only if -i is explicitly given and the
>> file is encrypted, but not if one of the three known location exists and is
>> encrypted.
>>
>> The further problem is that the CLI fails to use stephenc’s neat
>> ssh-agent plugin, now used for the ssh-credentials plugin. This would
>> automatically decrypt the private key in case you are running ssh-agent.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to 
>> jenkinsci-dev+unsubscribe@**googlegroups.com<jenkinsci-dev%[email protected]>
>> .
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to