Sarika Jamdade
Sarika Jamdade

Reputation: 67

`error: Failed to create repository /demo due to: POST https://api.github.com/user/repos: 404 Not Found []`

I have setup kubernetes cluster using minikube on local , installed jenkins x on that but while creating project on jx using jx create spring I am getting error error: Failed to create repository /demo5 due to: POST https://api.github.com/user/repos: 404 Not Found [] I have also tried with jx create spring --git-username=user_name --git-api-token=token

Upvotes: 2

Views: 729

Answers (2)

Jared Rieger
Jared Rieger

Reputation: 71

I ran into this issue while running through the getting started guide for https://toolkit.fluxcd.io/get-started/. I ran into this issue while trying to create a repo from a token that I had created. Turns out I not given the token that I was using for the guide enough permissions to be able to create a repo.

Try checking the permissions of the token. That immediately resolved the issue for me.

I think Github responds with a poor response code choice in this case. Should be an unauthorised response.

Upvotes: 1

James Strachan
James Strachan

Reputation: 9198

was the user_name you supplied a valid github user name? btw the repository name you gave was it just demo5 or did you add a / at the beginning? Maybe we need to strip out any leading/trailing slash characters

Upvotes: 0

Related Questions