0

I'm using github-api, an npm plugin, to create and manage repositories in node.js. I was able to create repositories for a user, and read a user's organizations, but I could not find out how to create a repository for an organization. I looked through the documentation but I am still confused as to how to create the repository.

Thanks in advance!

1 Answer 1

2

It seems that this client doesn't support repository creation for organizations. There is only createRepo for user.

The request for the user looks like:

POST /user/repos

and for the organization:

POST /orgs/:org/repos

where :org is the organisation name.

Sign up to request clarification or add additional context in comments.

3 Comments

Can I post with jQuery and how can I post with/without jQuery? Thanks so much!
I ended up just using the Github api's function by doing: github._request("POST", postmessage, options, cb)
That was an option as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.