Hi,
Curl doesn't know anything about ~/.config/copr, which supposed to be
used by copr-cli (and later by copr client libs). To use curl you should
provide credentials explicitly: curl --user login:token ... .
Preferable way is to use ``copr-cli build`` which utilize
~/.config/copr so you don't need to provide credentials each time.
On 09/13/2014 03:56 PM, Mark Reynolds wrote:
Using "http" instead of "curl" worked:
http --auth <login>:<password> POST
https://copr.fedoraproject.org/api/coprs/mreynolds/389-ds-base/new_build/
pkgs='http://mreynolds.fedorapeople.org/389-ds-base-09_12_2014-1.fc20...
If there's a different preferred way to post srpm's I would be interested to hear
about it.
Thanks,
Mark
On 09/12/2014 06:29 PM, Mark Reynolds wrote:
> Hello,
>
> I'm trying to upload a srpm to copr by using:
>
> curl --data
>
"pkgs=http://mreynolds.fedorapeople.org/389-ds-base-09_12_2014-1.fc20.src.rpm"
>
https://copr.fedoraproject.org/api/coprs/mreynolds/389-ds-base/new_build/
>
> {
> "error": "Login invalid/expired. Please visit
>
https://copr.fedoraproject.org/api get or renew your API token.",
> "output": "notok"
> }
>
> I did setup ~/.config/copr file correctly according to
>
https://copr.fedoraproject.org/api
>
> First I'm not sure if this is the best way to upload a srpm, second, the
> issue might be because my shell id is "mareynol" but my fedora/copr
> account is "mreynolds". I know this uid discrepancy caused issues with
> the fedora folks, where they had to do some kind of alias for mareynol
> -> mreynolds.
>
> Any help would be appreciated.
>
> Thanks,
> Mark
--
Best regards,
Gologuzov Valentin.