[chef] Making Hosted Chef API Requests with Curl?


Chronological Thread 
  • From: Alex Ethier < >
  • To:
  • Subject: [chef] Making Hosted Chef API Requests with Curl?
  • Date: Thu, 19 Apr 2012 16:42:46 -0700

No matter what I do I always get an error:

{"error":"Failed to authenticate as MY-USERNAME. Ensure that your
node_name and client key are correct."}

(should the error be "Ensure that your api-client-name and
api-client-key are correct"?  I'm referring to
X-Ops-UserId: The name of the API client whose private key will be
used to create the authorization header)

I'm following this documentation:
http://wiki.opscode.com/display/chef/Making+Authenticated+API+Requests

I'm using the same credentials as in my knife config.  (knife works fine)

(from the knife config)
node_name                ENV['OPSCODE_USER_NAME']
client_key               "#{keys_dir}/#{ENV['OPSCODE_USER_NAME']}.pem"


Anyone have a working exemple of how to make an api request with curl?

Thank you!

Alex


  • [chef] Making Hosted Chef API Requests with Curl?, Alex Ethier, 04/19/2012

Archive powered by MHonArc 2.6.16.

§