Unable to create repository associated with team through API #57781
Replies: 2 comments
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
I am having the same issue. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Unable to create an organization repository associated with a team
What happened?
Using the Github API docs, I created a POST request to create a repo within an organization. When I do not include the "team_id" parameter in the body, I am able to create the repo. When I add the "team_id" parameter, I am left with a 500 internal server error.
I am using a fine grained PAT with these permissions:
Organization permissions
(Read and Write access to members)
Repository permissions
(Read access to meta data)
(Read and write access to administration and code)
My full request header and body is as follows:
https://api.github.com/orgs/{org}/repos
{
"name": "test",
"description": "test repo"
"private": true,
"team_id": 8016637
}
Interestingly enough, when I input a random nonexistent team id, I get the response of "You need admin access to the team before adding a repository to it."
Beta Was this translation helpful? Give feedback.
All reactions