You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am trying to programmatically create a repository along with certain permissions.
Using the 1.0 API (locally hosted server) I always get a 401 - You are not authorized to access this resource.
I am an admin on the project, and I created the repo. However, when I try to add a group via the API, I am presented with the unauthorized access error message.
The call looks like this:
To test that the API works for me, I manually added the group through the web interface. I am a member of the group.
Then I added another group (through the web interface) with REPO_WRITE and REPO_READ.
I attempted to revoke those permissions:
With this I also get 401 - You are not authorized to access this resource.
I've read the API documentation and I should meet the requirements to do both of these actions.
"The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result." I am a PROJECT_ADMIN.
"The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource.
In addition, a user may not revoke a group's permissions if it will reduce their own permission level."
Since I added myself to the repo, I am REPO_ADMIN.