1

I am trying to make the repo private through GitHub Enterprise API by running :

$ curl -X PATCH $GitHubAPIurl -u $username:$password -d '{"name":"$d","private":"true"}' -k

But it returns message: not found

However, if I do a mild change : $ curl $GitHubAPIurl -u $username:$password -d '{"name":"$d","private":"true"}' -k This will tells me that the repo already exists

So it means that my $GitHubAPIurl variable is correct, but why the -X PATCH is not working for me?

  • Did you try with -X POST? – VonC Jan 09 '19 at 22:09
  • @VonC, the github api doc requires me to use `PATCH` instead of `POST` to set the repo public. Plus, `-X POST` behaves the same as without `-X ` and gave me the same response. –  Jan 09 '19 at 22:11
  • curl doesn't work with `-X PATCH`, you need to use `--request PATCH` – atp Jul 26 '19 at 11:33

0 Answers0