nicferrier / marmalade

Nic's clone of nex3's original marmalade. Nic is maintaining this now and updating this repo.
http://marmalade-repo.org
GNU General Public License v3.0
32 stars 8 forks source link

Cannot release package using api through curl #60

Closed ardumont closed 11 years ago

ardumont commented 11 years ago

Hi,

context

I try to automate my deploying and I tried to tinker with the api but seem unable to release.

I followed the documentation http://www.marmalade-repo.org/doc-files/api.7.html.

what I get

I receive a server error 500.

trace

Here is my attempt and the corresponding error.

tony@job (0,01,) 00:24:14 ~/repositories/perso/clj-jam (master) $ curl -v -F "name=ardumont" -F "token=my-token-retrieved-from-api-post" -F "package=/home/tony/repo/perso/or-trello/org-trello-0.1.5.tar" http://www.marmalade-repo.org/v1/packages
* About to connect () to www.marmalade-repo.org port 80 (#0)
*   Trying 78.46.66.17...
* connected
* Connected to www.marmalade-repo.org (78.46.66.17) port 80 (#0)
> POST /v1/packages HTTP/1.1
> User-Agent: curl/7.27.0
> Host: www.marmalade-repo.org
> Accept: */*
> Content-Length: 433
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------f403cee2c0c5
>
* additional stuff not fine transfer.c:1037: 0 0
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 100 Continue
* additional stuff not fine transfer.c:1037: 0 0
* additional stuff not fine transfer.c:1037: 0 0
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 500 Internal Server Error
< Server: nginx/1.2.3
< Date: Sun, 25 Aug 2013 22:29:25 GMT
< Content-Type: text/plain
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Powered-By: Express
< Set-Cookie: connect.sid=PcQq7EpLM9tWUoWWJCQmGS6T.TzpXos2hqPWp1tFIW1J2%2F6ceZXMlWHtzPUcNSg2HPys; path=/; expires=Mon, 26 Aug 2013 02:29:25 GMT; httpOnly
* HTTP error before end of send, stop sending
<
TypeError: Cannot call method 'match' of undefined
at Function.<anonymous> (/home/vagrant/node_modules/marmalade/lib/server/api.js:255:56)
at Function.next (/home/vagrant/node_modules/marmalade/node_modules/step/lib/step.js:51:23)
at next (/home/vagrant/node_modules/marmalade/node_modules/step/lib/step.js:51:23)
at next (/home/vagrant/node_modules/marmalade/node_modules/step/lib/step.js:63:7)
at /home/vagrant/node_modules/marmalade/node_modules/mongodb/lib/mongodb/collection.js:898:34
at /home/vagrant/node_modules/marmalade/node_modules/mongodb/lib/mongodb/cursor.js:131:9
at /home/vagrant/node_modules/marmalade/node_modules/mongodb/lib/mongodb/cursor.js:178:11
at /home/vagrant/node_modules/marmalade/node_modules/mongodb/lib/mongodb/cursor.js:490:35
at [object Object].close (/home/vagrant/node_modules/marmalade/node_modules/mongodb/lib/mongodb/cursor.js:669:5)
at [object Object].nextObject (/home/vagrant/node_modules/marmalade/node_modules/mongodb/lib/mongodb/cursor.js:4* Closing connection #0
                                                                                                                  )

Do you have any hint, please?

Cheers,

ardumont commented 11 years ago

My bad, I was the culprit. With the right command

curl -v -F "name=ardumont" -F "token=my-token" -F "package=@org-trello-0.1.5.tar" http://www.marmalade-repo.org/v1/packages

As they say, the problem is between keyboard and chair.

Sorry about that.