← Back to team overview

dhis2-devs team mailing list archive

Re: error using curl command

 

If i tried use test with -u ... that is work fine. but if i add more
function like -X POST -d -v.... it doesn't work....

On Fri, Sep 4, 2015 at 3:55 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:

> Hi Channara
>
> I just had a look at your original mail and I see that the user admin was
> recognized so it means the curl option was ok but some issue with the
> password.  My guess is that you have some strange characters in the
> password which are being expanded/interpreted by the shell.
>
> Try quoting like:
> -u "admin:xxxxx"
> or
> -u 'admin:xxxxx'
>
>
> On 4 September 2015 at 09:46, channara rin <rin.channara@xxxxxxxxx> wrote:
>
>> Hi Morten,
>> Hi tried test with user:password first. but still error.
>>
>> On Thu, Sep 3, 2015 at 11:43 PM, channara rin <rin.channara@xxxxxxxxx>
>> wrote:
>>
>>> yes, it work too.
>>>
>>>
>>> On Thu, Sep 3, 2015 at 6:45 PM, Morten Olav Hansen <mortenoh@xxxxxxxxx>
>>> wrote:
>>>
>>>> Try to test with something simpler
>>>>
>>>> curl -u user:pass http://server/api/dataElements
>>>>
>>>> And see if it works
>>>>
>>>> --
>>>> Morten
>>>>
>>>> On Thu, Sep 3, 2015 at 5:23 PM, Knut Staring <knutst@xxxxxxxxx> wrote:
>>>>
>>>>> Channara, are you using GOW?
>>>>>
>>>>> https://github.com/bmatzelle/gow
>>>>>
>>>>> On Thu, Sep 3, 2015 at 12:08 PM, Morten Olav Hansen <
>>>>> mortenoh@xxxxxxxxx> wrote:
>>>>>
>>>>>> I have also seen weird issues on window versions of cURL where -u
>>>>>> user:pass is required to be FIRST (mac/linux should be fine)
>>>>>>
>>>>>> --
>>>>>> Morten
>>>>>>
>>>>>> On Thu, Sep 3, 2015 at 5:07 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Channara
>>>>>>>
>>>>>>> The man page for curl indicates that the format of the command is:
>>>>>>>
>>>>>>> curl <options> <url>
>>>>>>>
>>>>>>> Try moving your url to the end of the line, after the options.  Also
>>>>>>> you might want to add "http://localhost...";
>>>>>>>
>>>>>>> On 3 September 2015 at 11:01, channara rin <rin.channara@xxxxxxxxx>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi DHIS2 friends,
>>>>>>>> i tried use curl command to import tracker, but i got error.
>>>>>>>> can you help me what is problem?
>>>>>>>> ***THIS IS COMMAND RUNNING:
>>>>>>>> [image: Inline image 1]
>>>>>>>>
>>>>>>>> ***THIS IS CONSOLE in APACHE
>>>>>>>> [image: Inline image 2]
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Knut Staring
>>>>> Dept. of Informatics, University of Oslo
>>>>> Norway: +4791880522
>>>>> Skype: knutstar
>>>>> http://dhis2.org
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

PNG image

PNG image


Follow ups

References