I can't get login tokens to work.
>> confluence --action login --user poulton --password mypass
successfully returns a token Er9NXZafyy . But then I can't do actions with that token:
>> confluence --action getSpaceList --login Er9NXZafyy
Error: Parameter 'password' is required.
>> confluence --action getSpaceList --loginFromStandardInput < junk.l
Error: Parameter 'password' is required.
I'm using Confluence 3.5.6
Use --password "". It will be ignored if the action you are using does not require a password and a token is provided. The token only works for SOAP based actions and a password is still required for non-SOAP actions. For Confluence, almost all actions are SOAP based still.
Okay, this works:
>> confluence --action getSpaceList --user poulton --password "" --login Er9NXZafyy
It seems like a bug to me that when --login is used it still requires a null --password. Even an error message that says this is required would address this.
There is a different bug in --loginFromStandardInput:
>> confluence --action login --user poulton --password mypass >junk.l
>> confluence --action getserverInfo --user poulton --password "" --loginFromStandardInput <junk.l
Remote error: com.atlassian.confluence.rpc.InvalidSessionException: User not authenticated or session expired. Call login() to open a new session
The problem turns out that it is expecting the DOS CR-LF in the file! When I run this command on Linux, text file lines have only LF on each line as God and Dennis Ritchie intended.
A workaround for Linux users:
>>confluence --action login --user poulton --password wikiwiki | sed 's/$/^M/' >junk.l
where "^M" is ctrl-M (a.k.a. CR).
It seems like the Linux version of the confluence(1) CLI binary ought not to be expecting CR-LF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, its a bit of an oddity that I have choosen not to fix. Password was always required (for all clients) before token support was added and in 99.9% of cases it is a convenient way to prevent people from forgetting to use it. Token support is limited to the SOAP request and is for more advanced users, etc... Over time non-SOAP requests will dominate (JIRA especially and eventually Confluence), so just leaving it as is.
Regarding your other issue, I opened CSOAP-178
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.