Creates a repository in an account.
Table of Contents
Prerequisite: Example assumes you have previously authenticated, and your valid session cookie is in 'mycookie'.
The following example creates a repository in your account and fetches the assets from the repository. It takes a couple moments for the repository assets to be fetched. You can perform a Show Repository to view the fetch_status and check if the fetch has successfully completed.
Note:
#!/bin/sh -e curl -i -H X_API_VERSION:1.5 -b mycookie -X POST \ -d repository[name]=MyGitRepository \ -d repository[source]=https://github.com/rightscale/rightscale_cookbooks.git \ -d repository[source_type]=git \ -d repository[credentials][ssh_key]=text: \ https://my.rightscale.com/api/repositories.xml
HTTP/1.1 201 Created Server: nginx/1.0.14 Date: Wed, 04 Sep 2013 21:21:35 GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Status: 201 Created Location: /api/repositories/239933001 X-Runtime: 371 X-Request-Uuid: 03c157ff325b4c28bde370f5a46ce79e Set-Cookie: Cache-Control: no-cache
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.