Github Apps create a user repository 404 error

I have a GitHub app with the administration read&write permission. I can create a repository within any installed organization - it works like a charm.
But when I try to create a user repository, I got some errors.
When I try to create in the “username” organization, I get 404 Not Found. POST
When I try to create as the authenticated user, I get 403 Resource not accessible by integration POST

How should I create a user repository? Should I get separate permission for that? I can list all user’s repositories.

My app is authorized with the user installation id - it is 100% correct because I retrieve it from the users/username/installation endpoint right before creating the repository.

Edit 2.
Where can I report this issue about the Github API?

1 Like

I was a little confused when you say create a username repository in an orgnanization above as no such concept exists.

The following link may help with a suggestion of using a token

Ok, I’ll try to explain it in other words :wink: I have a scenario:

  1. User installs my GitHub App and grant access read/write access to repositories
  2. My app lists all the available repositories from all the user’s installations, e.g., github . com/org1/repo1, github . com/username/repo2, etc.
  3. I want to create a repository in the same organization as users select repo from in the 2nd step, e.g., user select github . com/username/repo2 → I want to create a new repository github. com/username/repo2_app_repo

Everything works fine for Organizations but doesn’t work for the User’s repository. It seems that I can’t create a repository in the user namespace (user organization??) you mention is not an orgnanization owned it is a user owned repository.
There are differences in the way orgnanization owned repos work compared to use owned repos

To create a repository I would expect full repo access/permission would be required not just read/write.

What do you mean by full repo access/permission? I have highest possible permissions in “Repository permission” in the Github App permission section. Should I get something more?

Anyone? Where can I report the Github Apps API issue?

I’d be interested as well. Struggled with the same.